Align fullscreen return button with project actions
This commit is contained in:
@@ -9,6 +9,7 @@ import { useState, useEffect } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { Copy, FolderOpen, Minus, PanelLeft, PanelLeftClose, Square, X } from 'lucide-react';
|
||||
import { invokeIpc } from '@/lib/api-client';
|
||||
import { observeNativeFullscreen } from '@/lib/window-fullscreen';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useCodingWorkspaceStore } from '@/stores/coding-workspace';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
@@ -68,6 +69,10 @@ function ProductTitleBar({
|
||||
sidebarPeekOpen?: boolean;
|
||||
onSidebarPeekChange?: SidebarPeekChange;
|
||||
}) {
|
||||
const [nativeFullscreen, setNativeFullscreen] = useState(false);
|
||||
useEffect(() => {
|
||||
if (nativeTrafficLights) return observeNativeFullscreen(setNativeFullscreen);
|
||||
}, [nativeTrafficLights]);
|
||||
const sidebarCollapsed = useSettingsStore((state) => state.sidebarCollapsed);
|
||||
const sidebarWidth = useSettingsStore((state) => normalizeClassroomSidebarWidth(state.classroomSidebarWidth));
|
||||
const classroomTitlebarWidth = getClassroomTitlebarWidth(nativeTrafficLights ? 'darwin' : 'win32', sidebarCollapsed, sidebarWidth);
|
||||
@@ -124,7 +129,7 @@ function ProductTitleBar({
|
||||
>
|
||||
{workspaceLayout ? <div
|
||||
data-testid="classroom-titlebar-navigation"
|
||||
className={cn('flex h-full items-center gap-2 pr-12', nativeTrafficLights ? 'pl-[88px]' : 'pl-2')}
|
||||
className={cn('flex h-full items-center gap-2 pr-12', nativeTrafficLights && !nativeFullscreen ? 'pl-[88px]' : 'pl-3')}
|
||||
>
|
||||
<ModuleSwitcher sidebarCollapsed={false} toolbar iconOnly />
|
||||
{sidebarToggle}
|
||||
|
||||
Reference in New Issue
Block a user