From c7bee48199b9976919942ad28079f69e43c2a74f Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 13 May 2021 18:36:45 +0200 Subject: [PATCH] fixed zooming - fixes #3684 --- app/lib/app.ts | 5 ----- app/lib/window.ts | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/lib/app.ts b/app/lib/app.ts index 0b078753..e3a39ce7 100644 --- a/app/lib/app.ts +++ b/app/lib/app.ts @@ -212,13 +212,8 @@ export class Application { label: 'View', submenu: [ { role: 'reload' }, - { role: 'forceReload' }, { role: 'toggleDevTools' }, { type: 'separator' }, - { role: 'resetZoom' }, - { role: 'zoomIn' }, - { role: 'zoomOut' }, - { type: 'separator' }, { role: 'togglefullscreen' }, ], }, diff --git a/app/lib/window.ts b/app/lib/window.ts index 70036bcc..39a794bb 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -124,6 +124,9 @@ export class Window { this.window.loadURL(`file://${app.getAppPath()}/dist/index.html?${this.window.id}`, { extraHeaders: 'pragma: no-cache\n' }) + this.window.webContents.setVisualZoomLevelLimits(1, 1) + this.window.webContents.setZoomFactor(1) + if (process.platform !== 'darwin') { this.window.setMenu(null) }