Skip to content

Let bar icons give a little under the pointer - #16503

Merged
dhh merged 4 commits into
quattrofrom
bar-icon-press
Oct 24, 2026
Merged

dhh merged 4 commits into
quattrofrom
bar-icon-press

Conversation

@dhh

@dhh dhh commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Press feedback for the bar's icons, to match the panel buttons from #16484. While a bar widget is held down, its icon or label scales to 0.9 over 160ms on Style.easeOut and springs back on release.

  • Only the mark shrinks (WidgetButton's label and glyph, BarIconButton's content), never the button. The hit area and the bar's layout stay put, so there's no lost-click-at-the-edge problem. A bar glyph is small enough that a panel button's 0.97 wouldn't show.
  • The bar tells the widget it's held. Each bar slot lays its own MouseArea over the widget for drag-to-reorder, and that area takes the press, so the widget's own MouseArea never reported itself pressed. The slot now marks the button under the pointer as held from press until release, cancel, or the start of a drag.
  • So does an open panel. With a panel open, its full-screen overlay takes clicks on the bar and forwards them. It now marks the button under the pointer as held too, so clicking an icon to close its panel, or to switch to another, shows the press.
  • Animations off: it goes through Style.duration(), so turning animations off keeps it still.

Tried by hand on the author's desktop: opening, closing and switching panels from the bar. bar, bar-icon-geometry, bar-click-clipping, bar-drag, bar-widget-contract, keyboard-panel-lazy, clock and motion tests pass.

🤖 Generated with Claude Code

dhh and others added 4 commits October 24, 2026 16:51
Bar icons had no press state at all. Held down, a widget's label or
glyph now scales to 0.9 over 160ms on the strong ease-out and springs
back the same way. Only the mark shrinks, never the button, so the hit
area and the bar's layout stay put. A bar glyph is small enough that a
panel button's 0.97 wouldn't show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BarIconButton draws its icon in its own content item and turns
WidgetButton's label off, so the press scale never reached the icons
most of the bar is made of: the panels, indicators and tray. The
content item now takes it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each bar slot lays a MouseArea over its widget for dragging, and that
area takes the press, so the widget's own MouseArea never reported
itself pressed and the press feedback never showed. The slot now marks
the button under the pointer as held from press to release, cancel, or
the start of a drag, and the press scale follows that too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a panel open, its full-screen overlay takes clicks on the bar and
forwards them, so clicking an icon to close its panel, or to switch to
another, showed no press. The overlay now marks the bar button under
the pointer as held until release, as the bar's own press handler does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds press feedback to bar buttons without shrinking their hit areas.

  • Bar icons and labels shrink while a bar button is held.

Reviews (1) · Last reviewed commit: "Press bar icons through an open panel's ..." · Reviewed by Greptile

@dhh
dhh merged commit 13daf59 into quattro Oct 24, 2026
2 checks passed
@dhh
dhh deleted the bar-icon-press branch October 24, 2026 18:52
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
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