From 0f5d764111666b1810a1c77255df391a53091d01 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 12 Feb 2019 07:31:34 +0100 Subject: [PATCH] bootstrap - move zoom setting up --- src/bootstrap-window.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bootstrap-window.js b/src/bootstrap-window.js index c41965b30ae..80145240039 100644 --- a/src/bootstrap-window.js +++ b/src/bootstrap-window.js @@ -32,6 +32,12 @@ exports.load = function (modulePaths, resultCallback, options) { const args = parseURLQueryArgs(); const configuration = JSON.parse(args['config'] || '{}') || {}; + // Apply zoom level early to avoid glitches + const zoomLevel = configuration.zoomLevel; + if (typeof zoomLevel === 'number' && zoomLevel !== 0) { + webFrame.setZoomLevel(zoomLevel); + } + // Error handler // @ts-ignore process.on('uncaughtException', function (error) { @@ -51,12 +57,6 @@ exports.load = function (modulePaths, resultCallback, options) { // Enable ASAR support bootstrap.enableASARSupport(path.join(configuration.appRoot, 'node_modules')); - // Apply zoom level early to avoid glitches - const zoomLevel = configuration.zoomLevel; - if (typeof zoomLevel === 'number' && zoomLevel !== 0) { - webFrame.setZoomLevel(zoomLevel); - } - if (options && typeof options.canModifyDOM === 'function') { options.canModifyDOM(configuration); } -- GitLab