hide macos traffic light with custom titlebar (#636)

Co-authored-by: MrGarlic <bsamans@samans.com>
This commit is contained in:
MrGarlic1 2024-06-01 11:25:42 -04:00 committed by GitHub
parent 3772db9eea
commit d3e8dfa724
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -430,6 +430,7 @@ function createMainWindow() {
autoHideMenuBar: enableMenu autoHideMenuBar: enableMenu
})); }));
win.setMenuBarVisibility(false); win.setMenuBarVisibility(false);
if (process.platform === "darwin" && customTitleBar) win.setWindowButtonVisibility(false);
win.on("close", e => { win.on("close", e => {
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false; const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;