Skip to content

Build your personal knowledge base with Trilium Notes

feat(native-buttons): set arbitrary offset for traffic light

Elian Doran00c6d97e4a52
diff --git a/src/public/app/desktop.js b/src/public/app/desktop.js
index 6d558c55e5..560c2e5296 100644
--- a/src/public/app/desktop.js
+++ b/src/public/app/desktop.js
@@ -63,8 +63,12 @@ function initTitleBarButtons() {
const symbolColor = style.getPropertyValue("--native-titlebar-foreground");
if (color && symbolColor) {
- currentWindow.setTitleBarOverlay({ color, symbolColor });
+ // FIXME, do this only on windows
+ // currentWindow.setTitleBarOverlay({ color, symbolColor });
}
+
+ // FIXME: call only on darwin
+ currentWindow.setWindowButtonPosition({ x: 20, y: 20 });
}
// Update the native title bar buttons.
diff --git a/src/services/window.ts b/src/services/window.ts
index 5be4e6e80b..44e71e9b7a 100644
--- a/src/services/window.ts
+++ b/src/services/window.ts
@@ -115,7 +115,7 @@ async function createMainWindow(app: App) {
function getWindowExtraOpts() {
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
- extraOpts.titleBarStyle = "hidden";
+ extraOpts.titleBarStyle = (process.platform !== "darwin" ? "hidden" : "hiddenInset");
extraOpts.titleBarOverlay = true;
}