From 315fdf299f4582125107756666da90170cb2192e Mon Sep 17 00:00:00 2001 From: zt64 Date: Wed, 19 Apr 2023 22:15:10 -0400 Subject: [PATCH] guh --- src/main/mainWindow.ts | 6 +++--- src/renderer/components/Settings.tsx | 5 +++++ src/shared/settings.d.ts | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 0d7ed27..04feaad 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -75,8 +75,6 @@ function initTray(win: BrowserWindow) { win.on("hide", () => { trayMenu.items[0].enabled = true; }); - - win.on("page-title-updated", e => e.preventDefault()); } function initMenuBar(win: BrowserWindow) { @@ -232,9 +230,9 @@ export function createMainWindow() { devTools: true, preload: join(__dirname, "preload.js") }, - title: "Vencord", icon: ICON_PATH, frame: VencordSettings.store.frameless !== true, + ...Settings.store.staticTitle ? { title: "Vencord" } : {}, ...(VencordSettings.store.macosTranslucency ? { vibrancy: "sidebar", @@ -253,6 +251,8 @@ export function createMainWindow() { return false; }); + if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault()); + initWindowBoundsListeners(win); if (Settings.store.tray ?? true) initTray(win); initMenuBar(win); diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index fcbb289..a772da5 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -31,6 +31,11 @@ export default function SettingsUi() { "openLinksWithElectron", "Open Links in app (experimental)", "Opens links in a new Vencord Desktop window instead of your web browser" + ], + [ + "staticTitle", + "Static Title", + "Makes the window title \"Vencord\" instead of changing to the current page" ] ]; diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index 2f310b1..14d1ec7 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -17,4 +17,5 @@ export interface Settings { tray?: boolean; minimizeToTray?: boolean; skippedUpdate?: string; + staticTitle?: boolean; }