mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 04:32:26 +08:00
refactor(native-buttons): reduce duplication
This commit is contained in:
parent
b32eef9aa9
commit
14fb8b5dd9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user