From c5dc869c032f76aec005bf2d7c4f94c12fd586c2 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 10 Jun 2019 14:21:05 +0200 Subject: [PATCH] Make window size configurable Change-type: patch Changelog-entry: Make window size configurable --- lib/gui/etcher.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/gui/etcher.js b/lib/gui/etcher.js index 91a57358..00047ab0 100644 --- a/lib/gui/etcher.js +++ b/lib/gui/etcher.js @@ -60,11 +60,14 @@ const checkForUpdates = async (interval) => { */ const createMainWindow = () => { const mainWindow = new electron.BrowserWindow({ - width: 800, - height: 480, - useContentSize: true, + // eslint-disable-next-line no-magic-numbers + width: parseInt(config.width, 10) || 800, + // eslint-disable-next-line no-magic-numbers + height: parseInt(config.height, 10) || 480, + frame: !config.fullscreen, + useContentSize: false, show: false, - resizable: Boolean(config.fullscreen), + resizable: false, maximizable: false, fullscreen: Boolean(config.fullscreen), fullscreenable: Boolean(config.fullscreen),