We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5629445 commit 6bce834Copy full SHA for 6bce834
src/backend/main.ts
@@ -268,6 +268,21 @@ async function initializeWindow(): Promise<BrowserWindow> {
268
mainWindow.webContents.setVisualZoomLevelLimits(1, 1)
269
})
270
271
+ function applyZoom() {
272
+ const zoomFactor = processZoomForScreen(
273
+ configStore.get('zoomPercent', 100) / 100
274
+ )
275
+ mainWindow.webContents.setZoomLevel(zoomFactor)
276
+ mainWindow.webContents.setVisualZoomLevelLimits(1, 1)
277
+ }
278
+
279
+ mainWindow.on('maximize', applyZoom)
280
+ mainWindow.on('unmaximize', applyZoom)
281
+ mainWindow.on('restore', applyZoom)
282
+ mainWindow.on('enter-full-screen', applyZoom)
283
+ mainWindow.on('leave-full-screen', applyZoom)
284
+ mainWindow.webContents.on('did-navigate', applyZoom)
285
286
return mainWindow
287
}
288
0 commit comments