Browse Source

Check for the os when hiding the Dock

master
Mohammad Fares 5 years ago
parent
commit
42d950a2b6
  1. 11
      render/index.js

11
render/index.js

@ -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…
Cancel
Save