feat(titlebar): theme-colored window bar on macOS (#1199)

* feat(titlebar): theme-colored window bar on macOS

macOS showed the grey native title bar that ignores the app theme
(#1198). Enable titleBarStyle: Overlay so the webview reaches the top
edge and the native traffic lights float over the existing in-page
title bar, which already paints with the active theme.

Reuses the Linux title-bar grid: the bar is shown on macOS too (hidden
in native fullscreen), without the custom window buttons since the
traffic lights stay native. The GTK resize grips are now Linux-only.
Renamed the stylesheet to drop the misleading linux-only name.

* docs(changelog): macOS themed title bar

* fix(titlebar): crisp macOS bar text — drop transform layer and shadow

* fix(titlebar): drop now-playing text from the macOS bar
This commit is contained in:
Psychotoxical
2026-06-27 14:17:55 +02:00
committed by GitHub
parent c609beddfa
commit ed02ba4e1d
7 changed files with 49 additions and 13 deletions
+11
View File
@@ -3,6 +3,7 @@ import { getCurrentWindow } from '@tauri-apps/api/window';
import { Minus, Square, X } from 'lucide-react';
import { usePlayerStore } from '../store/playerStore';
import { useAuthStore } from '../store/authStore';
import { IS_MACOS } from '../utils/platform';
export default function TitleBar() {
const win = getCurrentWindow();
@@ -13,6 +14,11 @@ export default function TitleBar() {
return (
<div className="titlebar" data-tauri-drag-region>
{/* macOS drops the now-playing label: subpixel antialiasing is disabled
in the Overlay title-bar zone, so small text renders frayed. The bar
stays a clean themed strip with the native traffic lights (#1198);
the track is already shown in the player bar. */}
{!IS_MACOS && (
<div className="titlebar-track" data-tauri-drag-region>
{currentTrack && (
<>
@@ -23,7 +29,11 @@ export default function TitleBar() {
</>
)}
</div>
)}
{/* macOS keeps its native traffic lights (floating over the bar via
titleBarStyle: Overlay); only Linux draws in-page window buttons. */}
{!IS_MACOS && (
<div className="titlebar-controls" data-btnstyle={windowButtonStyle}>
{showMinimizeButton && (
<button
@@ -55,6 +65,7 @@ export default function TitleBar() {
<X size={10} strokeWidth={2.5} aria-hidden />
</button>
</div>
)}
</div>
);
}