Skip to content

Commit

Permalink
fix(welcome): remove traffic light on Mac
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Apr 18, 2024
1 parent cebf4e1 commit 124195c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/welcome/welcome.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

const { BrowserWindow } = require('electron')
const { getBrowserWindowIcon } = require('../shared/icons.utils.js')
const { isMac } = require('../shared/os.utils.js')

/**
* @return {import('electron').BrowserWindow}
Expand All @@ -42,6 +43,11 @@ function createWelcomeWindow() {
icon: getBrowserWindowIcon(),
})

if (isMac()) {
// Hide traffic light buttons on Mac
window.setWindowButtonVisibility(false)
}

window.loadURL(WELCOME_WINDOW_WEBPACK_ENTRY)

return window
Expand Down

0 comments on commit 124195c

Please sign in to comment.