Zoom cleanup

This commit is contained in:
Salah Benmoussati
2021-10-08 15:20:26 +02:00
parent bd698f05a6
commit 63f6cf6a88

View File

@@ -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');