refactor(native-buttons): reduce duplication

pull/702/head
Elian Doran 2024-12-04 22:58:32 +07:00
parent b32eef9aa9
commit 14fb8b5dd9
No known key found for this signature in database
1 changed files with 2 additions and 8 deletions

@ -115,14 +115,8 @@ async function createMainWindow(app: App) {
function getWindowExtraOpts() {
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
if (process.platform !== "darwin") {
// Windows, Linux
extraOpts.titleBarStyle = "hidden";
extraOpts.titleBarOverlay = true;
} else {
// macOS
extraOpts.titleBarStyle = "hiddenInset";
}
extraOpts.titleBarStyle = "hidden";
extraOpts.titleBarOverlay = true;
}
return extraOpts;