Skip to content

Zoom the title bar with the app and unstick the zoom pill - #416

Merged
broisnees merged 1 commit into
nightlyfrom
fix/zoom-titlebar
Nov 24, 2026
Merged

broisnees merged 1 commit into
nightlyfrom
fix/zoom-titlebar

Conversation

@broisnees

Copy link
Copy Markdown
Collaborator

These are two zoom bugs found while testing the 3.7.6 nightly at 200% on Linux.

The title bar stayed at 100%. TitleBar.svelte counter-zoomed itself with zoom: 1/scale. At 200%, the menus, workspace switcher and window buttons stayed half the size of the UI under them, and on macOS so did the open tabs, which sit inside that bar. The sidebar's top row used a fixed 36px or 38px --app-titlebar-h, which its own h-9 buttons overflowed.

  • The bar now zooms. The counter-zoom is gone, and --app-titlebar-h is 38px (macOS) or 36px times --app-scale, so the sidebar header, inset pages and the bar stay level.
  • macOS: the traffic-light spacer stays a fixed 78px, because the OS draws the lights at a fixed size. Tauri 2.12 has no public API to move them at runtime, so on a zoomed Mac they keep the position they have in a 38px bar.
  • Windows: the 46px caption buttons scale their width along with their height.

The zoom pill stuck on screen. ZoomIndicator.svelte kept a hovered flag that only pointerleave cleared. Whenever that event never came, the hide timer stopped firing for good. That happened when Reset unmounted under the pointer, when the window lost focus, or when the pill opened under a still pointer.

  • The fix: the timer now checks :hover when it fires. Reset, Escape, a click elsewhere and window blur close the pill, and it sits just under the title bar.

Testing

  • Tests: npm test passes (2003 node tests, 20 DOM tests), svelte-check shows 0 errors, the design lint has no new violations, and the build passes.
  • Real app, title bar: at 200% on Linux (Xvfb), the bar is 72px, level with the sidebar's top row (72px), and its menus, avatar and window buttons scale with the rest.
  • Real app, pill:
    • With the pointer elsewhere, it hides after 2s.
    • When it opens under a resting pointer, it stays while hovered and hides 2s after the pointer leaves.
    • Reset closes it and zooms back to 100%.
    • Escape closes it.
    • A click elsewhere closes it.
  • Not tested: macOS and Windows were not checked by hand.

TitleBar was counter-zoomed (zoom: 1/scale) to stay at 100% like an OS title bar, so at 200% its menus, workspace switcher, window buttons and the macOS tab strip were half the size of the UI under them, and the sidebar's top row (fixed --app-titlebar-h) overflowed its own buttons. The bar now zooms; --app-titlebar-h is 38px/36px x --app-scale; the macOS traffic-light spacer stays a fixed 78px because the OS draws the lights at a fixed size; Windows caption buttons scale their 46px width with the height.

ZoomIndicator kept a hovered flag that only pointerleave cleared. When that event never came (Reset unmounting under the pointer, focus loss, the pill opening under a still pointer) the hide timer never fired again. It now checks :hover when the timer fires, and Reset, Escape, an outside click and window blur close it.
@broisnees broisnees added the release:patch Default for PRs into nightly: next patch (.9 rolls to the next minor). On master: hotfix release label Nov 24, 2026
@broisnees
broisnees merged commit 9f53bfc into nightly Nov 24, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release:patch Default for PRs into nightly: next patch (.9 rolls to the next minor). On master: hotfix release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant