Upgrade electron

This commit is contained in:
Thomas Nordquist
2019-04-09 19:05:51 +02:00
parent 4dfeddbdae
commit cefd9e95db
3 changed files with 9 additions and 11 deletions

View File

@@ -93,9 +93,8 @@ const viewMenu: MenuItemConstructorOptions = {
click: () => {
const window = BrowserWindow.getFocusedWindow()
if (window) {
window.webContents.getZoomFactor((zoom) => {
window.webContents.setZoomFactor(Math.min(zoom + 0.1, 2.0))
})
const zoom = window.webContents.getZoomFactor()
window.webContents.setZoomFactor(Math.min(zoom + 0.1, 2.0))
}
},
},
@@ -105,9 +104,8 @@ const viewMenu: MenuItemConstructorOptions = {
click: () => {
const window = BrowserWindow.getFocusedWindow()
if (window) {
window.webContents.getZoomFactor((zoom) => {
window.webContents.setZoomFactor(Math.max(zoom - 0.1, 0.5))
})
const zoom = window.webContents.getZoomFactor()
window.webContents.setZoomFactor(Math.max(zoom - 0.1, 0.5))
}
},
},