style: use macos native traffic lights (#220)

Signed-off-by: elaraspace <281578948+elaraspace@users.noreply.github.com>
This commit is contained in:
Elara 2026-06-17 00:04:42 +09:00 committed by GitHub
parent c9d59ee044
commit ee830342eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,7 @@ export function createMainWindow() {
// (CLI arg --hidden or config)
const startHidden =
app.commandLine.hasSwitch("hidden") || config.startMinimisedToTray;
const isMacOS = process.platform === "darwin";
// create the window
mainWindow = new BrowserWindow({
@ -49,7 +50,9 @@ export function createMainWindow() {
width: 1280,
height: 720,
backgroundColor: "#191919",
frame: !config.customFrame,
frame: isMacOS ? true : !config.customFrame,
titleBarStyle: isMacOS ? "hidden" : "default",
trafficLightPosition: isMacOS ? { x: 8, y: 8 } : undefined,
icon: windowIcon,
show: !startHidden,
webPreferences: {