diff --git a/src/main/services/WindowService.ts b/src/main/services/WindowService.ts index f033cc82bf..ba508d7048 100644 --- a/src/main/services/WindowService.ts +++ b/src/main/services/WindowService.ts @@ -76,6 +76,7 @@ export class WindowService { webSecurity: false, webviewTag: true, allowRunningInsecureContent: true, + zoomFactor: configManager.getZoomFactor(), backgroundThrottling: false } }) @@ -185,6 +186,12 @@ export class WindowService { mainWindow.webContents.setZoomFactor(configManager.getZoomFactor()) }) + // set the zoom factor again when the window is going to restore + // minimize and restore will cause zoom reset + mainWindow.on('restore', () => { + mainWindow.webContents.setZoomFactor(configManager.getZoomFactor()) + }) + // ARCH: as `will-resize` is only for Win & Mac, // linux has the same problem, use `resize` listener instead // but `resize` will fliker the ui