Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
On MacOS, windows will have default Electron titlebar instead of custom one. The about window is excluded as it looks better on MacOS without a titlebar and just window control buttons.
  • Loading branch information
amanharwara committed Mar 30, 2019
1 parent 058852e commit 5f2850a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if (!singleInstanceLock) {
mainWindow = new BrowserWindow({
title: `Altus ${app.getVersion()}`,
frame: process.platform !== 'darwin' ? !settings.get('customTitlebar.value') : true,
titleBarStyle: 'hidden',
titleBarStyle: process.platform !== 'darwin' ? 'hidden' : 'default',
backgroundColor: '#282C34',
icon: './build/icon.ico',
webPreferences: {
Expand Down Expand Up @@ -328,7 +328,7 @@ function createWindow(id) {
title: `Settings`,
frame: process.platform !== 'darwin' ? !settings.get('customTitlebar.value') : true,
backgroundColor: '#282C34',
titleBarStyle: 'hidden',
titleBarStyle: process.platform !== 'darwin' ? 'hidden' : 'default',
width: 450,
height: 400,
resizable: false,
Expand Down Expand Up @@ -360,7 +360,7 @@ function createWindow(id) {
title: `Custom CSS for WhatsApp`,
frame: process.platform !== 'darwin' ? !settings.get('customTitlebar.value') : true,
backgroundColor: '#282C34',
titleBarStyle: 'hidden',
titleBarStyle: process.platform !== 'darwin' ? 'hidden' : 'default',
parent: mainWindow,
modal: process.platform === 'darwin' ? false : true,
resizable: true,
Expand Down Expand Up @@ -393,7 +393,7 @@ function createWindow(id) {
title: `Customize Theme`,
frame: process.platform !== 'darwin' ? !settings.get('customTitlebar.value') : true,
backgroundColor: '#282C34',
titleBarStyle: 'hidden',
titleBarStyle: process.platform !== 'darwin' ? 'hidden' : 'default',
parent: mainWindow,
modal: process.platform === 'darwin' ? false : true,
resizable: true,
Expand Down Expand Up @@ -425,7 +425,7 @@ function createWindow(id) {
title: `Manage Themes`,
frame: process.platform !== 'darwin' ? !settings.get('customTitlebar.value') : true,
backgroundColor: '#282C34',
titleBarStyle: 'hidden',
titleBarStyle: process.platform !== 'darwin' ? 'hidden' : 'default',
parent: mainWindow,
modal: process.platform === 'darwin' ? false : true,
resizable: false,
Expand Down

0 comments on commit 5f2850a

Please sign in to comment.