Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/celemod-ui/src/components/WindowTitlebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ export function WindowTitlebar() {
};
}, [platform]);

if (platform === "macos") {
// macOS keeps the native traffic lights via `titleBarStyle: "Overlay"`.
// This empty strip fills the reserved title bar area and makes the whole
// band draggable (Tauri handles dragging and double-click zoom; the native
// traffic lights stay clickable above the webview).
return <div className="macos-titlebar" data-tauri-drag-region />;
}

if (platform !== "windows") return null;

return (
Expand Down
12 changes: 8 additions & 4 deletions src/celemod-ui/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ textarea,
user-select: none;
}

/* macOS uses a native overlay title bar: this strip must match the traffic
light area reserved by `trafficLightPosition` in tauri.macos.conf.json.
The component marks it with data-tauri-drag-region for window dragging. */
.macos-titlebar {
flex: 0 0 32px;
min-height: 32px;
}

.window-caption {
flex: 0 0 auto;
padding: 0;
Expand Down Expand Up @@ -162,10 +170,6 @@ textarea,
min-height: 0;
}

html[data-platform="macos"] .app-shell {
padding-top: 32px;
}

.sidebar {
display: flex;
flex-direction: column;
Expand Down