Repository navigation
feat(titlebar): add custom title bar option for the main window on Windows - #1869
Merged
Merged
Conversation
Windows users can now replace the native caption bar of the main window with the in-page title bar that Linux already offers. The existing "Custom title bar" toggle (Settings > Appearance > Window) is shown on Windows too, with a Windows-specific description in every locale. It is off by default, so nothing changes for existing installs. The decoration transition logic in usePlatformShellSetup now runs on Windows as well; tiling-WM detection stays Linux-only. Closes #1859
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.
Closes #1859
Summary
Windows users can now replace the native caption bar of the main window with the in-page title bar that Linux already has.
TitleBar(drag region, now-playing label, minimize / maximize / close) takes over. Turning it off brings the native caption bar back.useCustomTitlebarDescWindowsin all 16 locales; the Linux description mentions GNOME/GTK, so Windows gets its own wording.Implementation
usePlatformShellSetup: the serialized decoration transition (mount custom bar first, then drop native decorations; restore on unmount) now runs on Linux and Windows. Tiling-WM detection stays Linux-only; on WindowsisTilingWmstarts asfalse.AppShell: addsshowWindowsTitlebaranddata-titlebar-platform="windows". The Linux resize-grip decoration stays scoped tolinux.linuxCustomTitlebarActivetocustomTitlebarActive.set_window_decorationswas already platform-neutral.Testing
usePlatformShellSetup.windows.test.ts: enable, keep native when off, restore on unmount, no tiling-WM probe on Windows.tsc --noEmit, ESLint,cargo fmt --all --checkclean; Vitest forsrc/app,src/features/settings,src/store,src/localesgreen, exceptAddServerForm.test.tsxfailing 3 tests in that combined run; it passes on its own on both this branch and main.tauri devon Windows 11 (toggle on and off).Runtime benchmark
set_window_decorationscall, a no-op while the toggle is off)fdc9f084(main), plus main + one comment line as noise controlf2e6d055psysonic benchmark run --scenario core-pages --runs 2 --profile realistic --json//favorites/artists/tracks/albumsmigrationReadyMs): main 5996 / control 5530 / branch 5544, 5197 / main 5594./tracksand home are bimodal on this machine (main itself ranges 1666–5261 and 8463–9065), so those two are not separable; no regression found.