mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 20:11:08 +00:00
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.
This commit is contained in:
1 parent
e107247dbc
commit
92ae9ed6f4
1 file changed
+11
-2
@@ -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);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user