Upgrade electron to v5.0.0

This commit is contained in:
Thomas Nordquist
2019-04-26 17:45:35 +02:00
parent 0f21f10c0d
commit 1f65a0f316
5 changed files with 26 additions and 479 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))
}
},
},