Skip to content

Tray icons expand horizontally on click to reveal detail text#1

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/code-review-repo
Draft

Tray icons expand horizontally on click to reveal detail text#1
Copilot wants to merge 2 commits intomasterfrom
copilot/code-review-repo

Conversation

Copy link
Copy Markdown

Copilot AI commented May 5, 2026

  • Previous: wifi/battery expand horizontally to reveal detail text
  • trayicon.vala — expose fields/methods needed by ExitTray
    • ICON_SIZE, COLLAPSED_WIDTH, MIN_EXPAND_THRESHOLDprotected const
    • current_width, anim_id, render_x, render_yprotected
    • added protected virtual int get_expanded_width() (default 180, overridable)
    • extracted protected void render_icon(Context ctx) helper
    • updated mouse_down() + render() to use get_expanded_width() and MIN_EXPAND_THRESHOLD
  • exit.vala — complete rewrite with two-button prompt
    • expands to 260 px on icon click
    • overrides mouse_motion() to track option_hovered (0=none, 1=Close App, 2=Shutdown)
    • overrides render(): draws "Close App" / "Shutdown" labels with fade-in progress alpha; option hover highlights (neutral grey / red tint)
    • "Close App" → wlrctl window focus kill with error handling
    • "Shutdown" → systemctl poweroff with error handling
    • clicking icon while expanded collapses the prompt

Copilot finished work on behalf of exynoxx May 5, 2026 13:46
Copilot AI requested a review from exynoxx May 5, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants