Make popouts respect the menu bar visibility setting

This commit is contained in:
V 2024-01-19 00:01:30 +01:00
parent 4f1615ecb3
commit 7d30dcdb47
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
2 changed files with 9 additions and 2 deletions

View file

@ -49,7 +49,8 @@ const DEFAULT_POPOUT_OPTIONS: BrowserWindowConstructorOptions = {
webPreferences: { webPreferences: {
nodeIntegration: false, nodeIntegration: false,
contextIsolation: true contextIsolation: true
} },
autoHideMenuBar: Settings.store.enableMenu
}; };
export const PopoutWindows = new Map<string, BrowserWindow>(); export const PopoutWindows = new Map<string, BrowserWindow>();
@ -98,6 +99,8 @@ export function createOrFocusPopup(key: string, features: string) {
} }
export function setupPopout(win: BrowserWindow, key: string) { export function setupPopout(win: BrowserWindow, key: string) {
win.setMenuBarVisibility(false);
PopoutWindows.set(key, win); PopoutWindows.set(key, win);
/* win.webContents.on("will-navigate", (evt, url) => { /* win.webContents.on("will-navigate", (evt, url) => {

View file

@ -41,7 +41,11 @@ export default function SettingsUi() {
"Allows you to make the window as small as your heart desires" "Allows you to make the window as small as your heart desires"
], ],
["staticTitle", "Static Title", 'Makes the window title "Vesktop" instead of changing to the current page'], ["staticTitle", "Static Title", 'Makes the window title "Vesktop" instead of changing to the current page'],
["enableMenu", "Enable Menu Bar", "Enables the application menu bar. Press ALT to toggle visibility."], [
"enableMenu",
"Enable Menu Bar",
"Enables the application menu bar. Press ALT to toggle visibility. Incompatible with 'Discord Titlebar'"
],
["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false], ["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false],
["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true], ["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true],
["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false], ["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false],