feat: custom in-app titlebar with overlay window chrome

- macOS: titleBarStyle Overlay + hiddenTitle, traffic lights aligned with the header
- header itself is the titlebar: draggable regions, no native glass strip
- solid (not blurred) header surfaces once content scrolls
- keep traffic lights clear of controls on library/login/settings pages
This commit is contained in:
1xDed committed 2026-11-27 03:11:09 +03:00
1 parent 61ebc66127
commit 1c499f42ec
9 files changed
+52 -50

No files matched your search

+2 -1
View File
@@ -258,6 +258,7 @@ export const LibraryHeader = () => {
return (
<>
<AppBar
data-tauri-drag-region
className={
scrollTrigger
? "library-header scrolling flex flex-row"
@@ -267,7 +268,7 @@ export const LibraryHeader = () => {
elevation={0}
color="transparent"
>
<div className="flex flex-row" style={{ gap: "0.6em" }}>
<div className="flex flex-row" data-tauri-drag-region style={{ gap: "0.6em" }}>
<IconButton onClick={handleDrawerOpen}>
<div className="material-symbols-rounded">menu</div>
</IconButton>
@@ -11,6 +11,15 @@
z-index: 10;
padding: 0.25em !important;
transition: all 0.2s ease-in-out;
html.is-macos & {
// The window has an overlay titlebar: keep controls clear of the traffic lights
// without pushing the right-hand actions out of the viewport.
padding-left: 72px !important;
width: calc(100vw - 4em - 72px) !important;
left: calc(2em + 72px) !important;
right: 2em !important;
}
&::after {
content: "";
@@ -18,10 +27,13 @@
inset: -0.35em;
pointer-events: none;
border-radius: inherit;
@include glass-effect;
// Solid titlebar surface: no glass/blur.
background-color: $clr-background-default;
border: 1px solid rgb(255 255 255 / 0.08);
box-shadow: 0 4px 20px rgb(0 0 0 / 0.4);
opacity: 0;
z-index: -1;
transition: all 150ms;
transition: opacity 150ms;
}
&.scrolling {
&::after {