diff options
author | Stefan <stefan@adlk.io> | 2019-03-06 15:52:49 +0100 |
---|---|---|
committer | Stefan <stefan@adlk.io> | 2019-03-06 15:52:49 +0100 |
commit | f65ebfd598ad1e82e00fb255986de4766cbd7429 (patch) | |
tree | 73836760f5eb4c1678280fb8eb74a37e0879bc02 /src | |
parent | use same zooming logic for all os (diff) | |
download | ferdium-app-f65ebfd598ad1e82e00fb255986de4766cbd7429.tar.gz ferdium-app-f65ebfd598ad1e82e00fb255986de4766cbd7429.tar.zst ferdium-app-f65ebfd598ad1e82e00fb255986de4766cbd7429.zip |
Add ctrl+ for zoom in on Windows
Diffstat (limited to 'src')
-rw-r--r-- | src/stores/AppStore.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 168aa7e48..0bd1518d5 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -176,6 +176,20 @@ export default class AppStore extends Store { | |||
176 | }, | 176 | }, |
177 | ); | 177 | ); |
178 | 178 | ||
179 | // We need to add an additional key listener for ctrl+ on windows. Otherwise only ctrl+shift+ would work | ||
180 | if (isWindows) { | ||
181 | key( | ||
182 | 'ctrl+=', () => { | ||
183 | debug('Windows: zoom in via ctrl+'); | ||
184 | const { webview } = this.stores.services.active; | ||
185 | webview.getZoomLevel((level) => { | ||
186 | // level 9 =~ +300% and setZoomLevel wouldnt zoom in further | ||
187 | if (level < 9) webview.setZoomLevel(level + 1); | ||
188 | }); | ||
189 | }, | ||
190 | ); | ||
191 | } | ||
192 | |||
179 | this.locale = this._getDefaultLocale(); | 193 | this.locale = this._getDefaultLocale(); |
180 | 194 | ||
181 | this._healthCheck(); | 195 | this._healthCheck(); |