Skip to content

feat: magnify workspace icons like the Dock - #319

Merged
Seb-GRAF merged 1 commit into
mainfrom
feat/workspace-magnification
Oct 26, 2026
Merged

Seb-GRAF merged 1 commit into
mainfrom
feat/workspace-magnification

Conversation

@Seb-GRAF

Copy link
Copy Markdown
Collaborator

Problem

Workspace app icons are small, and nothing helps you aim at one or tell which app it is until the native tooltip shows after its delay. Fixes #318.

Changes

  • Magnification (WorkspaceMagnifier.swift): the widget's x axis stretches around the pointer. Icons zoom from their top edge, up to workspace.magnification under the pointer, fading out over 36 points. The stretch only moves neighbours by the icons' own growth, so gaps keep about their resting size and the point under the pointer stays put. Workspace numbers and window titles move with the icons, and cell backgrounds and the cell underline widen with their cells. Everything is drawing only, so the bar's layout and the other widgets never move.
  • Positions: icons and labels read their frame in .global space at draw time with visualEffect. Nested hosting views share window coordinates, which covers the drag source and drop target views. Backgrounds track their frame with onGeometryChange. Reading frames once per pointer move left parts stale after a drop.
  • Animation: pointer moves update the icons directly, like the Dock. Only entering and leaving the widget animate, and Reduce Motion turns that animation off.
  • Tooltip: the app's name uses the bar's shared tooltip (store.popup.showTooltip). It follows only the pointer's x, so the lower part of a zoomed icon keeps it. It waits 100 ms before showing, so a quick sweep doesn't build a tooltip window for every icon it crosses. The native tooltips are off while magnification is on.
  • Drag and drop: while magnification is on, each icon's button reaches down by the amount the icon grows, so a zoomed icon can be clicked or dragged anywhere. The zoom settles back when a drag starts, and pointer tracking pauses until the drop. The drag image takes in the zoomed icon's sideways overflow.
  • Settings: Magnify on hover and a Magnification slider (110% to 200%) in the workspace widget's settings.
  • Config, schema and docs: workspace.magnification is decoded and added to the schema, and it's documented in docs/widgets.md and docs/settings.md.

Testing

  • swift test for the schema and decoder check, workspace window drag, workspace layout, presentation and widget tests: 102 tests pass.
  • Tried on a live bar (AeroSpace, windows mode, 40-point bar with a glass theme): magnification, spacing, the tooltip, and dragging windows between workspaces.
  • A two-minute sample profile while the bar was in use showed about 1 ms per frame on average for drawing and layout.
  • Not checked: yabai, OmniWM and Spaces sources (the path without drag), appGlyphs text sharpness when zoomed, bars shorter than about 30 points (zoomed icons can be cut off at the bar's bottom), Reduce Motion, multiple displays, and the More widgets popup.

Screenshots and a recording to follow.

Merging

One commit, so any merge method keeps it.

Claude Opus 5.5 via Claude Code

@Seb-GRAF
Seb-GRAF force-pushed the feat/workspace-magnification branch from 2929694 to 236e31f Compare October 26, 2026 09:48
@Seb-GRAF
Seb-GRAF merged commit b067f3b into main Oct 26, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/workspace-magnification branch October 26, 2026 10:08
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Magnify workspace app icons like the Dock on hover

1 participant