diff --git a/src/App.tsx b/src/App.tsx index 6a6d8b1..f0eb35f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -214,19 +214,14 @@ export default function App() { return "Nothing matches this filter."; }; + // Each pane reserves its own strip for the traffic lights instead of one + // band across the top, so the sidebar's right border runs unbroken from the + // very top of the window. In macOS window fullscreen there are no traffic + // lights, so the inset collapses. + const titleBarInset = !windowFullscreen; + return (
- {/* The webview paints the title bar itself. It sits directly above the - sidebar and top bar, so it takes the panel colour, not the page's. - In macOS window fullscreen the traffic lights are gone, so the strip - would just be a blank bar — it collapses instead. */} - {!windowFullscreen && ( -
- )} -
{/* With the sidebar hidden, a thin strip along the left edge brings it back on hover. */} @@ -251,6 +246,7 @@ export default function App() { totalVideos={totals.videos} totalDownloaded={totals.downloaded} onHide={() => { setSidebarHidden(true); setSidebarPeek(false); }} + titleBarInset={titleBarInset} />
)} @@ -264,6 +260,7 @@ export default function App() { totalVideos={totals.videos} totalDownloaded={totals.downloaded} onHide={() => setSidebarHidden(true)} + titleBarInset={titleBarInset} /> )} @@ -279,6 +276,7 @@ export default function App() { view={view} onView={setView} sidebarHidden={sidebarHidden} onShowSidebar={() => { setSidebarHidden(false); setSidebarPeek(false); }} + titleBarInset={titleBarInset} /> {!online && ( diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 20fdcb5..5c6b0f7 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -11,11 +11,13 @@ interface Props { onHide: () => void; /** True when revealed by hover over the left edge rather than pinned open. */ floating?: boolean; + /** Reserve room for the macOS traffic lights above the header. */ + titleBarInset: boolean; } export default function Sidebar({ channels, activeChannel, onSelect, onOpenSettings, totalVideos, totalDownloaded, - onHide, floating, + onHide, floating, titleBarInset, }: Props) { const row = "flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 " + @@ -35,6 +37,10 @@ export default function Sidebar({ "lg:border-b-0 lg:border-r") } > + {/* The pane starts at the very top of the window so its right border is + one unbroken line; this reserves the strip the traffic lights sit in. */} + {titleBarInset &&
} +
+ {titleBarInset &&
} +
{sidebarHidden && (