fix: unbroken divider between sidebar and feed
The title bar was one band across the top of the window, so the sidebar's right border only began below it and the pane read as detached from the top of the window. Each pane now reserves its own strip for the traffic lights instead. The border runs from the very top, and because both insets are the same height the sidebar header and the top bar share a baseline, so their bottom borders form one continuous line across the window. Both strips stay draggable, and the inset collapses in window fullscreen where there are no traffic lights to clear.
This commit is contained in:
+9
-11
@@ -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 (
|
||||
<div className="flex h-screen flex-col">
|
||||
{/* 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 && (
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
className="h-9 shrink-0 bg-white dark:bg-slate-900"
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="relative flex min-h-0 flex-1 flex-col lg:flex-row">
|
||||
{/* 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}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user