Place apps below the title bar, not behind it
A child webview is positioned against the window frame while the shell measures the hole it left from inside the content view. Borderless, those origins coincided and it never showed. With a title bar back they are a title bar apart, so every app was drawn that much too high - painting over the right-hand part of the bar, which read as the bar being tinted by whichever site was open, and leaving a strip of the same height along the bottom. Tauri cannot report that height. Both inner_position/outer_position and inner_size/outer_size come back identical on macOS - measured, both differences were zero against a window whose content is plainly a title bar shorter than its frame. NSWindow.contentLayoutRect knows, so it is asked once and cached. Also hides the window title, and centres the navigation row in its own strip rather than letting it crowd the bar above it.
This commit is contained in:
@@ -122,7 +122,7 @@ export default function Nav({
|
||||
{/* Only the expander survives the rail's header. Back and forward are
|
||||
a two-finger swipe and reload is ⌘R, so a toolbar here would be
|
||||
clutter standing in for something nobody asked for. */}
|
||||
<div className="flex w-full flex-col items-center border-b border-slate-200 pb-2 dark:border-slate-800">
|
||||
<div className="flex w-full flex-col items-center border-b border-slate-200 py-2.5 dark:border-slate-800">
|
||||
<button onClick={onToggleCollapse} title="Expand" className={ICON_CHROME}>
|
||||
<Collapse open={false} />
|
||||
</button>
|
||||
@@ -173,7 +173,7 @@ export default function Nav({
|
||||
|
||||
return (
|
||||
<aside className={shell} style={{ width: PANEL }}>
|
||||
<header className="flex items-center gap-0.5 border-b border-slate-200 px-1.5 pb-2 dark:border-slate-800">
|
||||
<header className="flex items-center gap-0.5 border-b border-slate-200 px-1.5 py-2.5 dark:border-slate-800">
|
||||
{controls}
|
||||
<button
|
||||
onClick={onToggleCollapse}
|
||||
|
||||
Reference in New Issue
Block a user