Fix zoom shortcuts on Linux

This commit is contained in:
Mattias Granlund 2024-01-08 10:21:45 +01:00
parent 644359b821
commit a19939ea39

View File

@ -32,11 +32,12 @@
events.on('goto', (path: string) => goto(path)),
events.on('openSendIssueModal', () => shareIssueModal?.show()),
// Zoom using cmd +, - and =
hotkeys.on('Meta+Equal', () => (zoom = Math.min(zoom + 0.0625, 3))),
hotkeys.on('Meta+Minus', () => (zoom = Math.max(zoom - 0.0625, 0.375))),
hotkeys.on('Meta+Digit0', () => (zoom = 1)),
hotkeys.on('Meta+T', () => {
// Zoom keys using cmd/ctrl depending on platform
hotkeys.on('$mod+Equal', () => (zoom = Math.min(zoom + 0.0625, 3))),
hotkeys.on('$mod+Minus', () => (zoom = Math.max(zoom - 0.0625, 0.375))),
hotkeys.on('$mod+Digit0', () => (zoom = 1)),
hotkeys.on('$mod+T', () => {
userSettings.update((s) => ({
...s,
theme: $userSettings.theme == 'light' ? 'dark' : 'light'