Merge fix/macos-titlebar-settings into pre-release

cc

# Conflicts:
#	crates/qbz-ui/ui/settings/AppearanceSettings.slint
This commit is contained in:
vicrodh committed 2026-07-08 10:53:01 -06:00
commit 2f258e1933
6 files changed
+49 -11

No files matched your search

+5 -3
View File
@@ -59,9 +59,11 @@ export component AppWindow inherits Window {
// winit attributes hook instead. `no-frame` is the authoritative switch
// (the adapter re-applies it at every realization — same lesson as the
// miniplayer, see MiniPlayerWindow below); the persisted pref is seeded
// into AppearanceState BEFORE the first show, and changing it takes an
// app restart (Wayland negotiates decorations at surface creation).
no-frame: !AppearanceState.is-macos && !AppearanceState.use-system-title-bar;
// into `system-title-bar-active` BEFORE the first show; the settings
// toggle edits the pref (`use-system-title-bar`) and Rust decides per
// platform whether it reaches this applied state live (Linux) or only
// on the next launch (macOS — attributes fixed at surface creation).
no-frame: !AppearanceState.is-macos && !AppearanceState.system-title-bar-active;
// Edge-resize for the frameless mode (the winit backend only engages it
// on undecorated windows, so this is inert under system chrome).
resize-border-width: 6px;
@@ -694,6 +694,10 @@ export component AppearanceSettings inherits VerticalLayout {
}
}
}
// Tiling-WM row: Linux-only — on macOS the native traffic lights are
// always present (overlay or system bar), so a "hide completely"
// frameless mode does not exist there (same gating idiom as the
// WINDOW CONTROLS rows below).
if !AppearanceState.is-macos: SettingRow {
label: @tr("Hide title bar");
description: @tr("Frameless window without window controls or header drag (for tiling window manager users)");
+4 -4
View File
@@ -582,7 +582,7 @@ export component HeaderBar inherits Rectangle {
// the native traffic lights (overlay attributes from the winit hook) and
// only needs the drag surface + a left inset under the lights.
property <bool> chrome-drag-enabled:
!AppearanceState.use-system-title-bar && !AppearanceState.hide-title-bar;
!AppearanceState.system-title-bar-active && !AppearanceState.hide-title-bar;
property <bool> chrome-controls:
root.chrome-drag-enabled && !AppearanceState.is-macos
&& AppearanceState.show-window-controls;
@@ -592,7 +592,7 @@ export component HeaderBar inherits Rectangle {
// Left inset: the native traffic-light band on macOS (~70px logical; 78px
// keeps a comfortable gap) or the drawn cluster when positioned left.
property <length> chrome-left-inset:
AppearanceState.is-macos && !AppearanceState.use-system-title-bar ? 78px
AppearanceState.is-macos && !AppearanceState.system-title-bar-active ? 78px
: (root.chrome-controls && root.wc-on-left ? root.wc-cluster-width + 6px : 0px);
// Custom-chrome drag surface. Declared FIRST among the header's elements
@@ -938,7 +938,7 @@ export component HeaderBar inherits Rectangle {
if AppearanceState.show-purchases && !OfflineState.offline
&& AppearanceState.nav-tb-purchases
&& !AppearanceState.hide-title-bar
&& !AppearanceState.use-system-title-bar: VerticalLayout {
&& !AppearanceState.system-title-bar-active: VerticalLayout {
alignment: center;
NavTab {
icon: @image-url("../assets/icons/shopping-bag.svg");
@@ -1044,7 +1044,7 @@ export component HeaderBar inherits Rectangle {
if AppearanceState.show-purchases && !OfflineState.offline
&& AppearanceState.nav-tb-purchases
&& !AppearanceState.hide-title-bar
&& !AppearanceState.use-system-title-bar: VerticalLayout {
&& !AppearanceState.system-title-bar-active: VerticalLayout {
alignment: center;
CompactDirectBtn {
icon: @image-url("../assets/icons/shopping-bag.svg");
+1 -1
View File
@@ -782,7 +782,7 @@ export component Sidebar inherits Rectangle {
if AppearanceState.show-purchases && !OfflineState.offline
&& !(AppearanceState.nav-tb-purchases
&& !AppearanceState.hide-title-bar
&& !AppearanceState.use-system-title-bar): SidebarDirectRow {
&& !AppearanceState.system-title-bar-active): SidebarDirectRow {
icon: @image-url("../assets/icons/shopping-bag.svg");
label: @tr("Purchases");
active: NavState.view == ContentView.purchases
+8
View File
@@ -3002,6 +3002,14 @@ export global AppearanceState {
// macOS = overlay (native traffic lights over the header). The .slint
// default is the safe Linux one.
in-out property <bool> use-system-title-bar: true;
// APPLIED chrome state (what the window was actually created with, vs the
// persisted pref above which the settings toggle edits). All chrome
// bindings (no-frame, header drag/inset/controls, Purchases placement)
// read THIS one. Rust decides per platform how the pref propagates:
// Linux mirrors the pref here live (hot apply, today's behavior); macOS
// leaves it at the startup value (the overlay attributes are fixed at
// window creation — restart to apply).
in-out property <bool> system-title-bar-active: true;
// Tiling-WM variant: frameless without drawn controls / header drag.
in-out property <bool> hide-title-bar: false;
// Phase 2 (deferred): rounded corners matching the desktop decoration.