Skip to content

Commit

Permalink
Fix vibrancy on older MacOS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Jan 12, 2020
1 parent 0f208c4 commit b0edc2d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,15 @@ function sendToAllWindows(eventName, data) {
}
}


function getVibrancy() {
if(os.platform === "darwin") {
const release = os.release().split('.')[1]
if(release >= 14) {
return 'fullscreen-ui'
}
}
return 'dark'
}

function createSplash() {
splashWindow = new BrowserWindow({
Expand Down Expand Up @@ -213,7 +221,7 @@ function createSettingsWindow() {
resizable: false,
backgroundColor: '#00FFFFFF',
titleBarStyle: 'hidden',
vibrancy: 'fullscreen-ui',
vibrancy: getVibrancy(),
webPreferences: {
navigateOnDragDrop: false,
webSecurity: false,
Expand Down Expand Up @@ -253,7 +261,7 @@ function createWindow() {
frame: false,
backgroundColor: '#00FFFFFF',
titleBarStyle: 'hidden',
vibrancy: 'fullscreen-ui',
vibrancy: getVibrancy(),
webPreferences: {
navigateOnDragDrop: false,
webSecurity: false,
Expand Down

0 comments on commit b0edc2d

Please sign in to comment.