diff --git a/lib/gui/app/app.ts b/lib/gui/app/app.ts index ab4325f8..f177a9e9 100644 --- a/lib/gui/app/app.ts +++ b/lib/gui/app/app.ts @@ -356,6 +356,16 @@ async function main() { ReactDOM.render( React.createElement(MainPage), document.getElementById('main'), + // callback to set the correct zoomFactor for webviews as well + async () => { + const fullscreen = await settings.get('fullscreen'); + const width = fullscreen ? window.screen.width : window.outerWidth; + try { + electron.webFrame.setZoomFactor(width / settings.DEFAULT_WIDTH); + } catch (err) { + // noop + } + }, ); } diff --git a/lib/gui/app/models/settings.ts b/lib/gui/app/models/settings.ts index 7deb1f11..8bfc9106 100644 --- a/lib/gui/app/models/settings.ts +++ b/lib/gui/app/models/settings.ts @@ -26,6 +26,9 @@ const debug = _debug('etcher:models:settings'); const JSON_INDENT = 2; +export const DEFAULT_WIDTH = 800; +export const DEFAULT_HEIGHT = 480; + /** * @summary Userdata directory path * @description diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index 36282fd4..02657539 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -122,8 +122,8 @@ interface AutoUpdaterConfig { async function createMainWindow() { const fullscreen = Boolean(await settings.get('fullscreen')); - const defaultWidth = 800; - const defaultHeight = 480; + const defaultWidth = settings.DEFAULT_WIDTH; + const defaultHeight = settings.DEFAULT_HEIGHT; let width = defaultWidth; let height = defaultHeight; if (fullscreen) {