fix(windows): titlebar logo color and window-controls overlap (#1627)
Co-authored-by: Neil Parker <nwparker@anthropic.com>
This commit is contained in:
@@ -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 && (
|
||||
<div
|
||||
className="absolute top-0 right-0 z-10 flex items-center h-[36px]"
|
||||
style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
|
||||
className="absolute top-0 z-10 flex items-center h-[36px]"
|
||||
style={{
|
||||
right: 'var(--window-controls-width)',
|
||||
WebkitAppRegion: 'no-drag'
|
||||
} as React.CSSProperties}
|
||||
>
|
||||
{rightSidebarToggle}
|
||||
</div>
|
||||
|
||||
@@ -416,7 +416,9 @@
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
:not(.dark) .titlebar-logo {
|
||||
/* Why: .dark is toggled on <html> (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 {
|
||||
|
||||
@@ -302,7 +302,7 @@ function RightSidebarInner(): React.JSX.Element {
|
||||
/* ── Top activity bar: horizontal icon row ── */
|
||||
<ContextMenu>
|
||||
<ContextMenuTrigger asChild>
|
||||
<div className="flex items-center justify-between border-b border-border h-[36px] min-h-[36px] pl-2 pr-1">
|
||||
<div className="flex items-center justify-between border-b border-border h-[36px] min-h-[36px] pl-2 pr-1 right-sidebar-header-inset">
|
||||
<TooltipProvider delayDuration={400}>
|
||||
<div className="flex items-center">{activityBarIcons}</div>
|
||||
{closeButton}
|
||||
@@ -316,7 +316,7 @@ function RightSidebarInner(): React.JSX.Element {
|
||||
</ContextMenu>
|
||||
) : (
|
||||
/* ── Side layout: static title header ── */
|
||||
<div className="flex items-center justify-between h-[36px] min-h-[36px] px-3 border-b border-border">
|
||||
<div className="flex items-center justify-between h-[36px] min-h-[36px] px-3 border-b border-border right-sidebar-header-inset">
|
||||
<span className="text-[11px] font-semibold uppercase tracking-wider text-foreground">
|
||||
{visibleItems.find((item) => item.id === effectiveTab)?.title ?? ''}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user