Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/desktop/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4984,6 +4984,18 @@ function installZoomShortcuts(window) {
setAndPersistZoomLevel(window, window.webContents.getZoomLevel() - ZOOM_STEP)
}
})

// Ctrl/Cmd + mouse wheel — the standard desktop/browser zoom gesture
// (#40295). Chromium surfaces it as the main-process 'zoom-changed' event
// (wheel events are DOM-side, so before-input-event never sees them).
// Route through the same persist+notify funnel as the keyboard shortcuts
// so wheel zoom survives restarts and the settings Scale control stays in
// sync, and use the same half step for consistency.
window.webContents.on('zoom-changed', (event, zoomDirection) => {
event.preventDefault()
const delta = zoomDirection === 'in' ? ZOOM_STEP : -ZOOM_STEP
setAndPersistZoomLevel(window, window.webContents.getZoomLevel() + delta)
})
}

function installContextMenu(window) {
Expand Down
Loading