Check for the os when hiding the Dock

This commit is contained in:
Mohammad Fares 2018-07-24 11:00:21 +03:00
parent ba59e2223c
commit 42d950a2b6
1 changed files with 7 additions and 4 deletions

View File

@ -8,17 +8,20 @@
var path = require('path'),
app = require('electron').app,
BrowserWindow = require('electron').BrowserWindow,
ipcMain = require('electron').ipcMain;
ipcMain = require('electron').ipcMain,
os = require('os');
// Set as global to be read by the web page
global.step = process.argv[2] || 1;
// Hide the Dock for macOS
app.dock.hide();
// Set the display scale factor to 1
app.commandLine.appendSwitch('force-device-scale-factor', 1);
// Hide the Dock for macOS
if (os.platform() == 'darwin') {
app.dock.hide();
}
// When the app is ready
app.on('ready', createWindow);