diff --git a/src-tauri/tauri.windows.conf.json b/src-tauri/tauri.windows.conf.json index 4461d5fb8..a58255315 100644 --- a/src-tauri/tauri.windows.conf.json +++ b/src-tauri/tauri.windows.conf.json @@ -4,6 +4,7 @@ "windows": [ { "label": "main", + "title": "CC Switch", "titleBarStyle": "Visible", "minWidth": 900, "minHeight": 600 diff --git a/src/App.tsx b/src/App.tsx index f13eacf25..65e08ba4b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,6 +31,7 @@ import { useProxyStatus } from "@/hooks/useProxyStatus"; import { useLastValidValue } from "@/hooks/useLastValidValue"; import { extractErrorMessage } from "@/utils/errorUtils"; import { cn } from "@/lib/utils"; +import { isWindows, isLinux } from "@/lib/platform"; import { AppSwitcher } from "@/components/AppSwitcher"; import { ProviderList } from "@/components/providers/ProviderList"; import { AddProviderDialog } from "@/components/providers/AddProviderDialog"; @@ -60,7 +61,8 @@ type View = | "agents" | "universal"; -const DRAG_BAR_HEIGHT = 28; // px +// macOS Overlay mode needs space for traffic light buttons, Windows/Linux use native titlebar +const DRAG_BAR_HEIGHT = isWindows() || isLinux() ? 0 : 28; // px const HEADER_HEIGHT = 64; // px const CONTENT_TOP_OFFSET = DRAG_BAR_HEIGHT + HEADER_HEIGHT; diff --git a/src/components/common/FullScreenPanel.tsx b/src/components/common/FullScreenPanel.tsx index a58bba95a..93f0b4aa3 100644 --- a/src/components/common/FullScreenPanel.tsx +++ b/src/components/common/FullScreenPanel.tsx @@ -3,6 +3,7 @@ import { createPortal } from "react-dom"; import { motion, AnimatePresence } from "framer-motion"; import { ArrowLeft } from "lucide-react"; import { Button } from "@/components/ui/button"; +import { isWindows, isLinux } from "@/lib/platform"; interface FullScreenPanelProps { isOpen: boolean; @@ -12,7 +13,7 @@ interface FullScreenPanelProps { footer?: React.ReactNode; } -const DRAG_BAR_HEIGHT = 28; // px - match App.tsx +const DRAG_BAR_HEIGHT = isWindows() || isLinux() ? 0 : 28; // px - match App.tsx const HEADER_HEIGHT = 64; // px - match App.tsx /**