mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
feat(native-buttons): fallback to original implementation for Linux
This commit is contained in:
@@ -114,9 +114,21 @@ async function createMainWindow(app: App) {
|
||||
|
||||
function getWindowExtraOpts() {
|
||||
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
||||
|
||||
const isMac = (process.platform === "darwin");
|
||||
const isWindows = (process.platform === "win32");
|
||||
|
||||
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
|
||||
extraOpts.titleBarStyle = (process.platform !== "darwin" ? "hidden" : "hiddenInset");
|
||||
extraOpts.titleBarOverlay = true;
|
||||
if (isMac) {
|
||||
extraOpts.titleBarStyle = "hiddenInset";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else if (isWindows) {
|
||||
extraOpts.titleBarStyle = "hidden";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else {
|
||||
// Linux or other platforms.
|
||||
extraOpts.frame = false;
|
||||
}
|
||||
}
|
||||
|
||||
return extraOpts;
|
||||
|
||||
Reference in New Issue
Block a user