This commit is contained in:
Vendicated
2026-08-24 14:47:48 +02:00
parent fd7ada3cd8
commit 667768c433
5 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
export function mergeDefaults<T>(obj: T, defaults: T): T { export function mergeDefaults<T>(obj: T, defaults: T): T {
for (const key in defaults) { for (const key in defaults) {
const v = defaults[key]; const v = defaults[key];
if (typeof v === "object" && !Array.isArray(v)) { if (typeof v === "object" && !Array.isArray(v) && v !== null) {
obj[key] ??= {} as any; obj[key] ??= {} as any;
mergeDefaults(obj[key], v); mergeDefaults(obj[key], v);
} else { } else {
+1 -1
View File
@@ -37,7 +37,7 @@ const DEFAULT_POPOUT_OPTIONS: BrowserWindowConstructorOptions = {
backgroundColor: "#2f3136", backgroundColor: "#2f3136",
minWidth: MIN_POPOUT_WIDTH, minWidth: MIN_POPOUT_WIDTH,
minHeight: MIN_POPOUT_HEIGHT, minHeight: MIN_POPOUT_HEIGHT,
frame: Settings.store.customTitleBar !== true, frame: Settings.store.nativeTitleBar,
titleBarStyle: process.platform === "darwin" ? "hidden" : undefined, titleBarStyle: process.platform === "darwin" ? "hidden" : undefined,
trafficLightPosition: trafficLightPosition:
process.platform === "darwin" process.platform === "darwin"
@@ -66,19 +66,19 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
key: "enableMenu", key: "enableMenu",
title: "Enable Menu Bar", title: "Enable Menu Bar",
description: "Enables the application menu bar. Press ALT to toggle visibility.", description: "Enables the application menu bar. Press ALT to toggle visibility.",
disabled: () => Settings.store.nativeTitleBar !== true disabled: () => !Settings.store.nativeTitleBar
}, },
{ {
key: "enableShadow", key: "enableShadow",
title: "Enable Window Shadow", title: "Enable Window Shadow",
description: "Enables the window shadow. Requires a full restart.", description: "Enables the window shadow. Requires a full restart.",
disabled: () => Settings.store.nativeTitleBar === true disabled: () => Settings.store.nativeTitleBar
}, },
{ {
key: "enableRoundedCorners", key: "enableRoundedCorners",
title: "Enable Rounded Corners", title: "Enable Rounded Corners",
description: "Enables rounded corners. Requires a full restart.", description: "Enables rounded corners. Requires a full restart.",
disabled: () => Settings.store.nativeTitleBar === true disabled: () => Settings.store.nativeTitleBar
}, },
{ {
key: "enableSplashScreen", key: "enableSplashScreen",
-2
View File
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { Settings } from "renderer/settings";
import { isMac } from "renderer/utils"; import { isMac } from "renderer/utils";
import { addPatch } from "./shared"; import { addPatch } from "./shared";
@@ -21,7 +20,6 @@ addPatch({
], ],
getPlatformClass() { getPlatformClass() {
if (Settings.store.customTitleBar) return "platform-win";
if (isMac) return "platform-osx"; if (isMac) return "platform-osx";
return "platform-web"; return "platform-web";
} }
+1 -1
View File
@@ -8,7 +8,7 @@ import { Settings } from "renderer/settings";
import { addPatch } from "./shared"; import { addPatch } from "./shared";
if (Settings.store.customTitleBar) if (!Settings.store.nativeTitleBar)
addPatch({ addPatch({
patches: [ patches: [
{ {