mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-08 01:05:28 +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() {
|
function getWindowExtraOpts() {
|
||||||
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
||||||
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
|
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
|
||||||
if (process.platform !== "darwin") {
|
extraOpts.titleBarStyle = "hidden";
|
||||||
// Windows, Linux
|
extraOpts.titleBarOverlay = true;
|
||||||
extraOpts.titleBarStyle = "hidden";
|
|
||||||
extraOpts.titleBarOverlay = true;
|
|
||||||
} else {
|
|
||||||
// macOS
|
|
||||||
extraOpts.titleBarStyle = "hiddenInset";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return extraOpts;
|
return extraOpts;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user