fix native titlebar option on macOS (#1347)

This commit is contained in:
PatRyk authored and GitHub committed 2026-10-23 19:38:23 +02:00
1 parent 1723bd2a33
commit da2121d7dc
3 files changed
+7 -6

No files matched your search

+4 -4
View File
@@ -386,9 +386,10 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
}
if (process.platform === "darwin") {
options.titleBarStyle = "hidden";
options.trafficLightPosition = { x: 10, y: 10 };
if (!nativeTitleBar) {
options.titleBarStyle = "hidden";
options.trafficLightPosition = { x: 10, y: 10 };
}
if (macosVibrancyStyle) {
options.vibrancy = macosVibrancyStyle;
options.backgroundColor = "#00000000";
@@ -406,7 +407,6 @@ function createMainWindow() {
const win = (mainWin = new BrowserWindow(buildBrowserWindowOptions()));
win.setMenuBarVisibility(false);
if (process.platform === "darwin" && Settings.store.nativeTitleBar) win.setWindowButtonVisibility(false);
win.on("close", e => {
const useTray = !isDeckGameMode && Settings.store.minimizeToTray && Settings.store.tray;
+1 -1
View File
@@ -38,7 +38,7 @@ const DEFAULT_POPOUT_OPTIONS: BrowserWindowConstructorOptions = {
minWidth: MIN_POPOUT_WIDTH,
minHeight: MIN_POPOUT_HEIGHT,
frame: Settings.store.nativeTitleBar,
titleBarStyle: process.platform === "darwin" ? "hidden" : undefined,
titleBarStyle: process.platform === "darwin" && !Settings.store.nativeTitleBar ? "hidden" : undefined,
trafficLightPosition:
process.platform === "darwin"
? {
+2 -1
View File
@@ -5,10 +5,11 @@
*/
import { Settings } from "renderer/settings";
import { isMac } from "renderer/utils";
import { addPatch } from "./shared";
if (!Settings.store.nativeTitleBar)
if (!isMac && !Settings.store.nativeTitleBar)
addPatch({
patches: [
{