Check for the os when hiding the Dock
This commit is contained in:
parent
ba59e2223c
commit
42d950a2b6
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue