diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index d0d41a339..e38376ed0 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -973,7 +973,11 @@ function App(): React.JSX.Element { className="flex flex-col h-screen w-screen overflow-hidden" style={ { - '--collapsed-sidebar-header-width': `${collapsedSidebarHeaderWidth}px` + '--collapsed-sidebar-header-width': `${collapsedSidebarHeaderWidth}px`, + // Why: consumed by anything that needs to avoid the fixed-position + // window-controls overlay on Windows (floating sidebar toggle, right + // sidebar header, etc.) without hardcoding 138px in multiple places. + '--window-controls-width': isWindows ? '138px' : '0px' } as React.CSSProperties } > @@ -1086,8 +1090,11 @@ function App(): React.JSX.Element { a few pixels, which reads as layout jitter. */} {workspaceActive && !rightSidebarOpen && (
{rightSidebarToggle}
diff --git a/src/renderer/src/assets/main.css b/src/renderer/src/assets/main.css index 375ee3a46..d300f2171 100644 --- a/src/renderer/src/assets/main.css +++ b/src/renderer/src/assets/main.css @@ -416,7 +416,9 @@ opacity: 0.75; } -:not(.dark) .titlebar-logo { +/* Why: .dark is toggled on (the :root), so :not(.dark) on a descendant + always matches. Scope to :root:not(.dark) to correctly target light mode only. */ +:root:not(.dark) .titlebar-logo { filter: invert(1); } @@ -465,7 +467,15 @@ the fixed-position overlay on Windows. */ .window-controls-titlebar-spacer { flex-shrink: 0; - width: 138px; + width: var(--window-controls-width, 0px); +} + +/* Why: the right sidebar header extends to the window's right edge. On Windows + the fixed-position window-controls overlay sits on top of that edge, so we + add matching padding-right so the header's close button (pr-1) isn't hidden + behind the overlay. --window-controls-width is 0px on non-Windows. */ +.right-sidebar-header-inset { + padding-right: var(--window-controls-width, 0px); } .sidebar-toggle { diff --git a/src/renderer/src/components/right-sidebar/index.tsx b/src/renderer/src/components/right-sidebar/index.tsx index 932da08e4..4182c7578 100644 --- a/src/renderer/src/components/right-sidebar/index.tsx +++ b/src/renderer/src/components/right-sidebar/index.tsx @@ -302,7 +302,7 @@ function RightSidebarInner(): React.JSX.Element { /* ── Top activity bar: horizontal icon row ── */ -
+
{activityBarIcons}
{closeButton} @@ -316,7 +316,7 @@ function RightSidebarInner(): React.JSX.Element { ) : ( /* ── Side layout: static title header ── */ -
+
{visibleItems.find((item) => item.id === effectiveTab)?.title ?? ''}