style: use macos native traffic lights (#220)
Signed-off-by: elaraspace <281578948+elaraspace@users.noreply.github.com>
This commit is contained in:
parent
c9d59ee044
commit
ee830342eb
|
|
@ -41,6 +41,7 @@ export function createMainWindow() {
|
||||||
// (CLI arg --hidden or config)
|
// (CLI arg --hidden or config)
|
||||||
const startHidden =
|
const startHidden =
|
||||||
app.commandLine.hasSwitch("hidden") || config.startMinimisedToTray;
|
app.commandLine.hasSwitch("hidden") || config.startMinimisedToTray;
|
||||||
|
const isMacOS = process.platform === "darwin";
|
||||||
|
|
||||||
// create the window
|
// create the window
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
|
|
@ -49,7 +50,9 @@ export function createMainWindow() {
|
||||||
width: 1280,
|
width: 1280,
|
||||||
height: 720,
|
height: 720,
|
||||||
backgroundColor: "#191919",
|
backgroundColor: "#191919",
|
||||||
frame: !config.customFrame,
|
frame: isMacOS ? true : !config.customFrame,
|
||||||
|
titleBarStyle: isMacOS ? "hidden" : "default",
|
||||||
|
trafficLightPosition: isMacOS ? { x: 8, y: 8 } : undefined,
|
||||||
icon: windowIcon,
|
icon: windowIcon,
|
||||||
show: !startHidden,
|
show: !startHidden,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue