diff --git a/apps/desktop/src/main.mjs b/apps/desktop/src/main.mjs index 38f72cf94..f833f2860 100644 --- a/apps/desktop/src/main.mjs +++ b/apps/desktop/src/main.mjs @@ -30,8 +30,8 @@ const transactionFile = path.join(userRoot, 'upgrade.json'); const interfaceFile = path.join(runtimeHome, 'data/user/settings/interface.json'); const seed = app.isPackaged ? path.join(process.resourcesPath, 'seed/runtime.json') : path.join(sourceDirectory, '../.local', targetId(), 'seed/runtime.json'); const publicKey = await readFile(path.join(sourceDirectory, '../assets/runtime-public.pem'), 'utf8'); -// macOS draws its 44px bar under the traffic lights; Windows uses a 38px WCO bar matching the sidebar tone. -const HEADER_HEIGHT = WINDOWS ? 38 : 44; +// The native macOS frame already excludes the title bar from the content bounds. +const HEADER_HEIGHT = WINDOWS ? 38 : 0; // Once loaded, solid themes use the sampled sidebar color. The glass gradient // keeps the fallback color for the window chrome. const PALETTE_BACKGROUND = WINDOWS @@ -872,9 +872,7 @@ else { window = new BrowserWindow({ title: 'Open DeepTutor', width: 1360, height: 920, minWidth: 900, minHeight: 620, backgroundColor: currentChromeBackground(), - ...(WINDOWS - ? { titleBarStyle: 'hidden', titleBarOverlay: titleBarOverlayOptions(ui.theme) } - : { titleBarStyle: 'hiddenInset', trafficLightPosition: { x: 18, y: 16 } }), + ...(WINDOWS && { titleBarStyle: 'hidden', titleBarOverlay: titleBarOverlayOptions(ui.theme) }), webPreferences: { preload: path.join(sourceDirectory, 'preload.cjs'), contextIsolation: true, sandbox: true, nodeIntegration: false }, }); window.webContents.on('will-navigate', event => event.preventDefault()); diff --git a/apps/desktop/src/shell.css b/apps/desktop/src/shell.css index e1fe9e158..78105f913 100644 --- a/apps/desktop/src/shell.css +++ b/apps/desktop/src/shell.css @@ -119,6 +119,8 @@ body { :root[data-phase="ready"] .titlebar { border-bottom-color: var(--line); } :root[data-phase="ready"] .titlebar-name { opacity: .88; } +:root:not([data-platform="win32"]) .titlebar { display: none; } + /* Windows inline menu bar merged into the WCO title bar. */ :root[data-platform="win32"] .titlebar { height: 38px;