Skip to content

Commit

Permalink
webview: Enable zooming with the mouse wheel.
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <anders@zulip.com>
  • Loading branch information
andersk committed Mar 21, 2024
1 parent bc75eba commit 70f0170
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/renderer/js/components/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ export default class WebView {
this.unsupportedDismissed = true;
this.$unsupported.hidden = true;
});

webContents.on("zoom-changed", (event, zoomDirection) => {
if (zoomDirection === "in") this.zoomIn();
else if (zoomDirection === "out") this.zoomOut();
});
}

private getBadgeCount(title: string): number {
Expand Down

0 comments on commit 70f0170

Please sign in to comment.