From 34a1b2dc3e65f6a5b72a59608f4dddd9bad4bd08 Mon Sep 17 00:00:00 2001 From: Elizabeth Schafer Date: Sun, 15 Dec 2019 10:30:29 -0500 Subject: [PATCH] Basing new zoom value off redux state https://github.com/laurent22/joplin/pull/2165#discussion_r357441406 https://github.com/laurent22/joplin/pull/2165#discussion_r357441512 --- ElectronClient/app/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index e26109013..6b1338686 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -1001,18 +1001,20 @@ class Application extends BaseApplication { }, { label: _('Zoom In'), click: () => { + const currentZoomFactor = this.store().getState().windowContentZoomFactor; this.store().dispatch({ type: 'WINDOW_CONTENT_ZOOM_FACTOR_SET', - zoomFactor: webFrame.getZoomFactor() + 0.1, + zoomFactor: currentZoomFactor + 0.1, }); }, accelerator: 'CommandOrControl+=', }, { label: _('Zoom Out'), click: () => { + const currentZoomFactor = this.store().getState().windowContentZoomFactor; this.store().dispatch({ type: 'WINDOW_CONTENT_ZOOM_FACTOR_SET', - zoomFactor: webFrame.getZoomFactor() - 0.1, + zoomFactor: currentZoomFactor - 0.1, }); }, accelerator: 'CommandOrControl+-',