rework Custom Titlebar setting -> Native Titlebar

This commit is contained in:
Vendicated
2026-08-24 14:14:39 +02:00
parent 3da54b777c
commit 09ce424b30
3 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -337,14 +337,14 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
enableMenu,
enableShadow,
enableRoundedCorners,
customTitleBar,
nativeTitleBar,
splashTheming,
splashBackground
} = Settings.store;
const { frameless, transparent, macosVibrancyStyle } = VencordSettings.store;
const { transparent, macosVibrancyStyle } = VencordSettings.store;
const noFrame = frameless === true || customTitleBar === true;
const frameless = nativeTitleBar !== true;
const backgroundColor =
splashTheming !== false ? splashBackground : nativeTheme.shouldUseDarkColors ? "#313338" : "#ffffff";
@@ -361,7 +361,7 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
// disable renderer backgrounding to prevent the app from unloading when in the background
backgroundThrottling: false
},
frame: !noFrame,
frame: !frameless,
autoHideMenuBar: enableMenu,
hasShadow: enableShadow !== false,
roundedCorners: enableRoundedCorners !== false,
@@ -377,7 +377,7 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
options.backgroundColor = "#00000000";
options.backgroundMaterial = transparencyOption;
if (customTitleBar) {
if (frameless) {
options.transparent = true;
}
}
@@ -407,7 +407,7 @@ function createMainWindow() {
const win = (mainWin = new BrowserWindow(buildBrowserWindowOptions()));
win.setMenuBarVisibility(false);
if (process.platform === "darwin" && Settings.store.customTitleBar) win.setWindowButtonVisibility(false);
if (process.platform === "darwin" && Settings.store.nativeTitleBar) win.setWindowButtonVisibility(false);
win.on("close", e => {
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;
@@ -11,7 +11,7 @@ import { BaseText, Divider, ErrorBoundary } from "@vencord/types/components";
import { ComponentType } from "react";
import { WebRTCIPHandlingPolicyPicker } from "renderer/components/settings/WebRTCIPHandlingPolicyPicker";
import { Settings, useSettings } from "renderer/settings";
import { isMac, isWindows } from "renderer/utils";
import { isMac } from "renderer/utils";
import { AutoStartToggle } from "./AutoStartToggle";
import { DeveloperOptionsButton } from "./DeveloperOptions";
@@ -56,10 +56,10 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
],
"User Interface": [
{
key: "customTitleBar",
title: "Discord Titlebar",
description: "Use Discord's custom title bar instead of the native system one. Requires a full restart.",
defaultValue: isWindows
key: "nativeTitleBar",
title: "Native Titlebar",
description: "Enable the system titlebar in addition to Discord's custom one. Requires a full restart.",
defaultValue: false
},
{
key: "staticTitle",
@@ -72,21 +72,21 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
title: "Enable Menu Bar",
description: "Enables the application menu bar. Press ALT to toggle visibility.",
defaultValue: false,
disabled: () => Settings.store.customTitleBar ?? isWindows
disabled: () => Settings.store.nativeTitleBar !== true
},
{
key: "enableShadow",
title: "Enable Window Shadow",
description: "Enables the window shadow. Requires a full restart.",
defaultValue: true,
disabled: () => Settings.store.customTitleBar !== true
disabled: () => Settings.store.nativeTitleBar === true
},
{
key: "enableRoundedCorners",
title: "Enable Rounded Corners",
description: "Enables rounded corners. Requires a full restart.",
defaultValue: true,
disabled: () => Settings.store.customTitleBar !== true
disabled: () => Settings.store.nativeTitleBar === true
},
{
key: "enableSplashScreen",
+1 -1
View File
@@ -30,7 +30,7 @@ export interface Settings {
enableTaskbarFlashing?: boolean;
disableMinSize?: boolean;
clickTrayToShowHide?: boolean;
customTitleBar?: boolean;
nativeTitleBar?: boolean;
enableSplashScreen?: boolean;
splashTheming?: boolean;