Skip to content

Commit

Permalink
Electron: alter window height based on platform
Browse files Browse the repository at this point in the history
  • Loading branch information
whphhg committed May 26, 2017
1 parent 433da57 commit 2ddebe9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ let mainWindow = null

/** Ready to load the GUI. */
app.on('ready', () => {
/** Provide default window height depending on the platform. */
const height = () => {
switch (process.platform) {
case 'win32':
return 738

case 'darwin':
return 722

default:
return 700
}
}

mainWindow = new BrowserWindow({
height: 700,
height: height(),
icon: join(__dirname, 'assets', 'images', 'logoRed.png'),
webPreferences: { experimentalFeatures: true },
width: 1152
Expand Down

0 comments on commit 2ddebe9

Please sign in to comment.