webview: Enable zooming with the mouse wheel.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-03-21 15:18:50 -07:00
parent bc75eba2bd
commit 70f0170f1d

View File

@@ -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 {