Merge pull request #2830 from balena-io/etcher-pro

Make window size configurable
This commit is contained in:
Alexis Svinartchouk 2019-06-13 18:39:30 +02:00 committed by GitHub
commit 724dade1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,11 +60,14 @@ const checkForUpdates = async (interval) => {
*/ */
const createMainWindow = () => { const createMainWindow = () => {
const mainWindow = new electron.BrowserWindow({ const mainWindow = new electron.BrowserWindow({
width: 800, // eslint-disable-next-line no-magic-numbers
height: 480, width: parseInt(config.width, 10) || 800,
useContentSize: true, // eslint-disable-next-line no-magic-numbers
height: parseInt(config.height, 10) || 480,
frame: !config.fullscreen,
useContentSize: false,
show: false, show: false,
resizable: Boolean(config.fullscreen), resizable: false,
maximizable: false, maximizable: false,
fullscreen: Boolean(config.fullscreen), fullscreen: Boolean(config.fullscreen),
fullscreenable: Boolean(config.fullscreen), fullscreenable: Boolean(config.fullscreen),