fixed zooming - fixes #3684

This commit is contained in:
Eugene Pankov 2021-05-13 18:36:45 +02:00
parent 1326fd7355
commit c7bee48199
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
2 changed files with 3 additions and 5 deletions

View file

@ -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' },
],
},

View file

@ -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)
}