From 79b0e23d282a6ca840ba4384a723da53f9551138 Mon Sep 17 00:00:00 2001 From: zumac Date: Mon, 9 Nov 2026 23:20:21 -0800 Subject: [PATCH] fix(desktop): let Windows caption buttons take the shell bar's surface The caption buttons kept an elevated surface, border and shadow whenever the workspace panel was open, and a dock-coloured surface in Creation. Both rules predate the full-width shell bar: the buttons now always sit on that bar, so their own surface showed as a white box beside it. Fixes #135 --- .../src/__tests__/app-chrome-tabs.test.ts | 9 +++++ desktop/frontend/src/styles.css | 33 +++---------------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/desktop/frontend/src/__tests__/app-chrome-tabs.test.ts b/desktop/frontend/src/__tests__/app-chrome-tabs.test.ts index 90aa9c992..47660cbd3 100644 --- a/desktop/frontend/src/__tests__/app-chrome-tabs.test.ts +++ b/desktop/frontend/src/__tests__/app-chrome-tabs.test.ts @@ -476,6 +476,15 @@ ok( "the Windows caption inset sits on the shell bar, not on the dock's tools row", ); +// The caption buttons sit on that bar at every dock state, so they take its +// surface. A dock-state or layout rule that paints them shows as a box (#135). +ok( + finalDeclaration(".windows-window-controls", "background") === "transparent" && + !/\.layout[^{]*~ \.windows-window-controls\s*\{[^}]*background/.test(stylesSource) && + !/\.app--creation \.windows-window-controls[^{]*\{[^}]*background/.test(stylesSource), + "the Windows caption buttons have no surface of their own on the shell bar", +); + ok( /@container \(max-width: 420px\) \{[\s\S]*?\.app--workbench \.workbench-dock__tab,[\s\S]*?:root\[data-theme-style\] \.app--workbench \.workbench-dock__tab \{[\s\S]*?padding-left:\s*10px;[\s\S]*?padding-right:\s*10px;[\s\S]*?gap:\s*4px;/.test(stylesSource), "workbench keeps compact four-tab spacing at narrow dock widths", diff --git a/desktop/frontend/src/styles.css b/desktop/frontend/src/styles.css index 0564ddd9e..81e81772c 100644 --- a/desktop/frontend/src/styles.css +++ b/desktop/frontend/src/styles.css @@ -19557,10 +19557,10 @@ body > .mermaid-diagram--fullscreen { align-items: stretch; justify-content: flex-end; color: var(--fg-dim); - background: var(--bg-elev); - border-left: 1px solid var(--border-soft); - border-bottom: 1px solid var(--border-soft); - box-shadow: -12px 0 18px -18px color-mix(in srgb, var(--fg) 46%, transparent); + /* The shell bar is a full-width row, so the caption buttons always sit on it, + whether or not the workspace panel is open. A surface of their own shows as + a box in a different colour from the bar (#135). */ + background: transparent; pointer-events: auto; user-select: none; --deepzora-draggable: no-drag; @@ -19575,21 +19575,6 @@ body > .mermaid-diagram--fullscreen { pointer-events: none; } -/* When the workspace panel is closed (no layout--workspace-open or -/* When the workspace panel is closed (no layout--workspace-open or - layout--workspace-maximized), make the window controls box transparent so it - blends into the title bar / background instead of showing a distinct box. */ -.app--windows-frameless .layout:not(.layout--workspace-open):not(.layout--workspace-maximized) ~ .windows-window-controls { - background: transparent; - border: none; - box-shadow: none; -} -:root[data-theme-style] .app--windows-frameless .layout:not(.layout--workspace-open):not(.layout--workspace-maximized) ~ .windows-window-controls { - background: transparent; - border: none; - box-shadow: none; -} - /* When a drawer/palette overlay is open, dim the window controls so they /* When a drawer/palette overlay is open, dim the window controls so they visually sit behind the backdrop instead of staying highlighted on top. */ @@ -30409,16 +30394,6 @@ body > .mermaid-diagram--fullscreen { transform: translateY(0.5px) scale(0.94) !important; } -/* Windows 控制框在 Creation 下默认用 --bg-elev(近纯白),与右侧 workbench-dock -/* Windows 控制框在 Creation 下默认用 --bg-elev(近纯白),与右侧 workbench-dock - 的统一底色(sidebar-bg 88%)有明显色差。改用相同底色,让控制框与右侧面板连成一片。 */ -.app--windows.app--creation .windows-window-controls, -:root[data-theme-style] .app--windows.app--creation .windows-window-controls { - background: color-mix(in srgb, var(--sidebar-bg) 88%, transparent); - border-left-color: transparent; - box-shadow: none; -} - /* Capability diagnostics settings page */ .diag-page { display: flex;