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

This commit is contained in:
Elian Doran 2024-12-04 23:44:26 +02:00
parent cd8c596bef
commit 00c6d97e4a
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}