fix: reserve Windows titlebar chrome space for Code actions

This commit is contained in:
2026-09-15 10:14:44 +08:00
parent a39fbc1619
commit dae64e52b9
6 changed files with 144 additions and 7 deletions

View File

@@ -14,12 +14,10 @@ import { useCodingWorkspaceStore } from '@/stores/coding-workspace';
import { useSettingsStore } from '@/stores/settings';
import logoWordmarkSource from '@/assets/makelore-wordmark-source.png';
import type { SidebarPeekSource } from './sidebar-peek';
import { TITLEBAR_LOGO_WIDTH, WINDOWS_TITLEBAR_CONTROLS_WIDTH } from './titlebar-metrics';
type SidebarPeekChange = (open: boolean, source: SidebarPeekSource) => void;
// Three 44px buttons plus the control container's 8px padding on each side.
const WINDOWS_TITLEBAR_CONTROLS_WIDTH = 148;
type TitleBarProps = {
integrated?: boolean;
workspaceLayout?: boolean;
@@ -123,10 +121,11 @@ function ProductTitleBar({
<div
data-testid="titlebar-logo"
className={cn(
'pointer-events-none absolute top-1/2 z-10 h-6 w-24 -translate-y-1/2 overflow-hidden',
'pointer-events-none absolute top-1/2 z-10 h-6 -translate-y-1/2 overflow-hidden',
overlay ? 'bg-transparent' : 'bg-background',
)}
style={{
width: TITLEBAR_LOGO_WIDTH,
right: `${windowControlsWidth}px`,
}}
>