From 92ae9ed6f429fb6d3bd97db202bb22175b68dd86 Mon Sep 17 00:00:00 2001 From: bincxz <16399091+binaricat@users.noreply.github.com> Date: Fri, 26 Dec 2025 01:40:20 +0800 Subject: [PATCH] Improves macOS settings window appearance and behavior Updates the frame, title bar, and traffic light positioning for the settings window on macOS to better match platform conventions. Ensures window button visibility and adjusts fullscreen capabilities for greater consistency across platforms. --- electron/bridges/windowManager.cjs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/electron/bridges/windowManager.cjs b/electron/bridges/windowManager.cjs index 782d4edb..aafe9645 100644 --- a/electron/bridges/windowManager.cjs +++ b/electron/bridges/windowManager.cjs @@ -558,14 +558,15 @@ async function openSettingsWindow(electronModule, options) { minHeight: 600, backgroundColor, icon: appIcon, + fullscreenable: !isMac, // NOTE: Do NOT set parent on Windows - it can cause the main window to close // when the settings window is closed in some edge cases. parent: isMac ? mainWindow : undefined, modal: false, show: false, - frame: false, + frame: isMac, titleBarStyle: isMac ? "hiddenInset" : undefined, - trafficLightPosition: isMac ? { x: 16, y: 18 } : undefined, + trafficLightPosition: isMac ? { x: 12, y: 12 } : undefined, webPreferences: { preload, contextIsolation: true, @@ -576,6 +577,14 @@ async function openSettingsWindow(electronModule, options) { settingsWindow = win; + if (isMac) { + try { + win.setWindowButtonVisibility(true); + } catch { + // ignore + } + } + win.on("enter-full-screen", () => { win.webContents?.send("netcatty:window:fullscreen-changed", true); });