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

+4 -11
View File
@@ -2,7 +2,7 @@ import MuiAppBar from "@mui/material/AppBar";
import IconButton from "@mui/material/IconButton";
import useScrollTrigger from "@mui/material/useScrollTrigger";
import { useLocation, useNavigate } from "@tanstack/react-router";
import React, { useCallback, useMemo, useState } from "react";
import React, { useCallback, useState } from "react";
import "./appBar.scss";
@@ -51,13 +51,6 @@ export const AppBar = () => {
const [showDrawer, setShowDrawer] = useState(false);
const appBarStyling = useMemo(() => {
return {
backgroundColor: "transparent",
paddingRight: "0 !important",
};
}, []);
const _handleNavigateToSearch = useCallback(
() => navigate({ to: "/search", search: { query: "" } }),
[navigate],
@@ -85,7 +78,7 @@ export const AppBar = () => {
return (
<>
<MuiAppBar
style={appBarStyling}
data-tauri-drag-region
className={
trigger
? "appBar flex flex-row flex-justify-spaced-between elevated"
@@ -94,7 +87,7 @@ export const AppBar = () => {
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}>
<span className="material-symbols-rounded">menu</span>
</IconButton>
@@ -112,7 +105,7 @@ export const AppBar = () => {
</IconButton>
</div>
<div className="flex flex-row" style={{ gap: "0.6em" }}>
<div className="flex flex-row" data-tauri-drag-region style={{ gap: "0.6em" }}>
<IconButton onClick={toggleSearchDialog}>
<span className="material-symbols-rounded">search</span>
</IconButton>