From 63f6cf6a8867c4badf6c223dc50bcbaeae2e9540 Mon Sep 17 00:00:00 2001 From: Salah Benmoussati Date: Fri, 8 Oct 2021 15:20:26 +0200 Subject: [PATCH] Zoom cleanup --- src/app/window-handler.ts | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index d9fb3e3f..d4c0a4a8 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -1847,16 +1847,12 @@ export class WindowHandler { this.switchClient(ClientSwitchType.CLIENT_2_0_DAILY), ); } - + globalShortcut.register('CmdOrCtrl+=', zoomIn); + globalShortcut.register('CmdOrCtrl+-', zoomOut); if (isMac) { globalShortcut.register('CmdOrCtrl+Plus', zoomIn); - globalShortcut.register('CmdOrCtrl+=', zoomIn); - if (this.isMana) { - globalShortcut.register('CmdOrCtrl+-', zoomOut); - } - } else if (this.isMana && (isWindowsOS || isLinux)) { + } else if (isWindowsOS || isLinux) { globalShortcut.register('Ctrl+=', zoomIn); - globalShortcut.register('Ctrl+-', zoomOut); globalShortcut.register('Ctrl+numadd', zoomIn); globalShortcut.register('Ctrl+numsub', zoomOut); globalShortcut.register('Ctrl+num0', resetZoomLevel); @@ -1871,15 +1867,11 @@ export class WindowHandler { globalShortcut.unregister(isMac ? 'Cmd+Alt+I' : 'Ctrl+Shift+I'); globalShortcut.unregister('CmdOrCtrl+R'); + globalShortcut.unregister('CmdOrCtrl+='); + globalShortcut.unregister('CmdOrCtrl+-'); if (isMac) { globalShortcut.unregister('CmdOrCtrl+Plus'); - globalShortcut.unregister('CmdOrCtrl+='); - if (this.isMana) { - globalShortcut.unregister('CmdOrCtrl+-'); - } - } else if (this.isMana && (isWindowsOS || isLinux)) { - globalShortcut.unregister('Ctrl+='); - globalShortcut.unregister('Ctrl+-'); + } else if (isWindowsOS || isLinux) { globalShortcut.unregister('Ctrl+numadd'); globalShortcut.unregister('Ctrl+numsub'); globalShortcut.unregister('Ctrl+num0');