diff --git a/sources/code/main/modules/config.ts b/sources/code/main/modules/config.ts index 98e70f24..96eacaf3 100644 --- a/sources/code/main/modules/config.ts +++ b/sources/code/main/modules/config.ts @@ -64,6 +64,9 @@ const defaultAppConfig = Object.freeze({ window: { transparent: false, hideOnClose: true + }, + darwin: { + csd: false } }, privacy: { diff --git a/sources/code/main/windows/main.ts b/sources/code/main/windows/main.ts index d08b1cad..a476664d 100644 --- a/sources/code/main/windows/main.ts +++ b/sources/code/main/windows/main.ts @@ -52,6 +52,10 @@ export default function createMainWindow(...flags:MainWindowFlags): BrowserWindo backgroundColor: appInfo.backgroundColor, transparent: appConfig.value.settings.general.window.transparent, show: false, + ...(process.platform === "darwin" && appConfig.value.settings.general.darwin.csd && { + titleBarStyle: "hiddenInset", + trafficLightPosition: { x: 10, y: 10 }, + }), webPreferences: { preload: resolve(app.getAppPath(), "app/code/renderer/preload/main.js"), nodeIntegration: false, // Never set to "true"! diff --git a/sources/translations/en/settings.json b/sources/translations/en/settings.json index 44a13ed7..d260ec61 100644 --- a/sources/translations/en/settings.json +++ b/sources/translations/en/settings.json @@ -30,6 +30,13 @@ "transparent": "Allow for translucent window background.", "hideOnClose": "Hide window to tray with the close button." } + }, + "darwin": { + "name": "macOS related settings", + "description": "Controls integrations with macOS system.", + "labels": { + "csd": "Enable client-side traffic lights placement." + } } }, "privacy": { diff --git a/sources/translations/pl/settings.json b/sources/translations/pl/settings.json index 1a8a4310..4be32254 100644 --- a/sources/translations/pl/settings.json +++ b/sources/translations/pl/settings.json @@ -30,6 +30,13 @@ "transparent": "Zezwól na przezroczyste tło okna.", "hideOnClose": "Ukrywaj okno do zasobnika przyciskiem zamykania." } + }, + "darwin": { + "name": "Ustawienia dla systemu macOS", + "description": "Steruje integracją z systemem macOS.", + "labels": { + "csd": "Włącz pozycjonowanie sygnalizacji świetlnej po stronie klienta." + } } }, "privacy": {