Repository navigation
Replace the system's title bar with the editor's own on Linux - #31
Merged
Merged
Conversation
On Linux the editor's window had the system's light title bar, naming the app, above the editor's own. The window now hides it (titleBarStyle 'hidden') and Electron draws the window buttons over the editor title bar's right end, in its colours (Window Controls Overlay). The title bar is the window's drag area, its controls excepted, and its right padding grows by --titlebar-controls-w, the width the buttons take (0 on macOS and Windows, which keep their title bars).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
On Linux (Ubuntu), the editor's window had two bars on top: the system's light title bar naming the app, and the editor's own dark title bar below it. The system's bar is now gone. The editor's title bar is the top of the window:
--fg-mutedsymbols). The bar's bottom border runs on under them.How:
src/main/launch/createEditorWindow.ts): on Linux,titleBarStyle: 'hidden'with atitleBarOverlay(Window Controls Overlay).CANVAS_COLORand the newTITLE_BAR_SYMBOL_COLOR(--fg-mutedas hex).TITLE_BAR_HEIGHT: 43 px, the bar's 44 px less its border.widgets/title-bar): the<header>isapp-region: drag, and its interactive parts areno-drag.--titlebar-controls-wtoken (tokens.css): the width the overlay leaves out of the title bar area, fromenv(titlebar-area-x/width).How it was tested
test/e2e/app.e2e.test.ts, Linux only): in the built app,navigator.windowControlsOverlayis visible;app-region: drag, and the toggles and the palette button tono-drag.app-regionis supported by this Electron's Chromium.desktopCapturer) shows the bar with the buttons at its right end.Checklist
feature/…,bugfix/…) intomain, and does one thingnpm run typecheck,npm run lint:fsd,npm run lint:structure,npm run lint,npm run lint:unused,npm run lint:duplicates,npm run lint:secrets,npm testandnpm run test:e2epass (1207 unit, 112 e2e)docs/SPEC.mddescribes any behaviour this changes (§7 Layout, §9 End-to-end), and so doesdocs/DESIGN_SYSTEM.md(Spacing)[Unreleased]inCHANGELOG.md(Changed)