diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index 320b7681..64e99892 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -58,9 +58,16 @@ async function checkForUpdates(interval: number) { function createMainWindow() { const fullscreen = Boolean(settings.get('fullscreen')); + const defaultWidth = 800; + const defaultHeight = 480; + let width = defaultWidth; + let height = defaultHeight; + if (fullscreen) { + ({ width, height } = electron.screen.getPrimaryDisplay().bounds); + } const mainWindow = new electron.BrowserWindow({ - width: parseInt(settings.get('width'), 10) || 800, - height: parseInt(settings.get('height'), 10) || 480, + width, + height, frame: !fullscreen, useContentSize: false, show: false, @@ -77,10 +84,12 @@ function createMainWindow() { backgroundThrottling: false, nodeIntegration: true, webviewTag: true, + zoomFactor: width / defaultWidth, }, }); buildWindowMenu(mainWindow); + mainWindow.setFullScreen(true); // Prevent flash of white when starting the application mainWindow.on('ready-to-show', () => {