Skip to content

Keep the title bar's spacing fixed when zoomed on Linux - #274

Merged
broisnees merged 1 commit into
nightlyfrom
titlebar-zoom-linux
Nov 17, 2026
Merged

broisnees merged 1 commit into
nightlyfrom
titlebar-zoom-linux

Conversation

@broisnees

Copy link
Copy Markdown
Collaborator

Zooming the app on Linux spread the title bar out: the menu labels (File, Edit, View...) stayed small while the padding and gaps around them grew with every zoom step.

The title bar counter-zooms itself with CSS zoom: 1/scale so it stays the size of a native title bar. Its text uses px variables, which every engine zooms back. Its padding and gaps are Tailwind spacing, which is rem, and WebKitGTK does not apply zoom to rem lengths, so on Linux those stayed at the zoomed size. Inside the bar the spacing unit is now calc(4px * var(--app-scale)), which zooms back to 4px in WebKitGTK, WebView2 and WKWebView alike.

Reproduced and checked in the real app (WebKitGTK, Xvfb): at 112% the menu row now lines up with 100%. design-lint and the 1799 tests pass.

@broisnees
broisnees merged commit 0453aec into nightly Nov 17, 2026
1 check passed
@broisnees
broisnees deleted the titlebar-zoom-linux branch November 17, 2026 05:25
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 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