|
|
|
@ -43,10 +43,12 @@ const config = new Config({
|
|
|
|
|
|
|
|
|
|
// Fix issues with HiDPI scaling on Windows platform
|
|
|
|
|
if (config.get('enable_hidpi_support') && (process.platform === 'win32')) { |
|
|
|
|
app.commandLine.appendSwitch('high-dpi-support', 'true') |
|
|
|
|
app.commandLine.appendSwitch('force-device-scale-factor', '1') |
|
|
|
|
app.commandLine.appendSwitch('high-dpi-support', 'true') |
|
|
|
|
app.commandLine.appendSwitch('force-device-scale-factor', '1') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
app.setAppUserModelId('com.saenzramiro.rambox'); |
|
|
|
|
|
|
|
|
|
// Menu
|
|
|
|
|
const appMenu = require('./menu')(config); |
|
|
|
|
|
|
|
|
@ -112,7 +114,7 @@ function handleSquirrelEvent() {
|
|
|
|
|
spawnUpdate(['--removeShortcut', exeName]); |
|
|
|
|
// Remove user app data
|
|
|
|
|
require('rimraf').sync(require('electron').app.getPath('userData')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(app.quit, 1000); |
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
@ -347,6 +349,9 @@ const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
|
|
|
|
|
if (mainWindow) { |
|
|
|
|
if (mainWindow.isMinimized()) mainWindow.restore(); |
|
|
|
|
mainWindow.focus(); |
|
|
|
|
mainWindow.show(); |
|
|
|
|
mainWindow.setSkipTaskbar(false); |
|
|
|
|
if (app.dock && app.dock.show) app.dock.show(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|