Skip to content

Menu bar: sweeping glow on the mark instead of the in-flight dot - #340

Merged
fylorn merged 1 commit into
devfrom
menubar-shimmer
Oct 17, 2026
Merged

fylorn merged 1 commit into
devfrom
menubar-shimmer

Conversation

@fylorn

@fylorn fylorn commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

While requests are running, the menu bar mark (or the two numbers in the numbers-only style) dims and a bright band sweeps across it, replacing the small dot.

  • Implemented as a Core Animation mask on the status button's layer: the render server drives the animation, the app does no per-frame work. Measured with the preview example: ~0.4% CPU vs ~4% when redrawing the button at 20 fps.
  • The mask is rebuilt only when the button/image geometry changes; the animation uses a fixed begin time so the band doesn't restart when numbers change.
  • Removed while the menu is open (on older macOS the highlight is drawn inside the button and would be dimmed too).
  • Reduce Motion: the band stands still in the middle.
  • bar_image takes an optional phase so previews/screenshots draw a given frame; menubar_preview --glow exports one cycle.
  • objc2-quartz-core added with only the features used.

🤖 Generated with Claude Code

While requests are running, the mark (or the numbers, in the numbers-only
style) dims and a bright band sweeps across it: 1.3 s across, 0.5 s rest.
It is a Core Animation mask on the status button's layer, so the render
server drives it and the app does no per-frame work (about 0.4% CPU in a
debug build, against about 4% for redrawing the button 20 times a second).

The mask is rebuilt only when the button or image geometry changes, and
the animation keeps a fixed begin time so the band does not restart. It
is taken off while the menu is open (older macOS draws the highlight in
the button) and stands still in the middle when Reduce Motion is on.

bar_image takes an optional phase so previews and screenshots can draw a
given frame; menubar_preview gains --glow to export one cycle of frames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 72c64eb into dev Oct 17, 2026
6 checks passed
@fylorn
fylorn deleted the menubar-shimmer branch October 17, 2026 05:00
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant