fix: reserve Windows titlebar chrome space for Code actions
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
import { TITLEBAR_LOGO_WIDTH, WINDOWS_TITLEBAR_CONTROLS_WIDTH } from '@/components/layout/titlebar-metrics';
|
||||
import type { ConversationSnapshot } from '@/types/coding-conversation';
|
||||
import type { CodingConversationMetadata } from '@/types/coding-project';
|
||||
|
||||
@@ -110,7 +111,8 @@ export function CodingConversationHeader({
|
||||
<header
|
||||
className={cn(
|
||||
'drag-region flex h-10 min-w-0 items-center gap-1 border-b border-border/80 px-3',
|
||||
hasCustomTitleBar ? 'bg-transparent pr-40' : 'bg-background',
|
||||
hasCustomTitleBar ? 'bg-transparent' : 'bg-background',
|
||||
platform === 'darwin' && 'pr-40',
|
||||
)}
|
||||
data-testid="coding-conversation-header"
|
||||
>
|
||||
@@ -184,7 +186,11 @@ export function CodingConversationHeader({
|
||||
<div
|
||||
className="pointer-events-none fixed right-0 top-0 z-[80] h-10"
|
||||
data-testid="coding-conversation-header-titlebar"
|
||||
style={{ left: `${sidebarCollapsed ? WORKSPACE_COLUMN_WIDTH : WORKSPACE_COLUMN_WIDTH * 2}px` }}
|
||||
style={{
|
||||
left: `${sidebarCollapsed ? WORKSPACE_COLUMN_WIDTH : WORKSPACE_COLUMN_WIDTH * 2}px`,
|
||||
// Keep both actions and their hit area outside the product chrome.
|
||||
right: platform === 'win32' ? TITLEBAR_LOGO_WIDTH + WINDOWS_TITLEBAR_CONTROLS_WIDTH : 0,
|
||||
}}
|
||||
>
|
||||
<div className="pointer-events-auto h-full">{header}</div>
|
||||
</div>,
|
||||
|
||||
Reference in New Issue
Block a user