From d83698bdd21d39d7920dc3c27717b95256408156 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 26 Sep 2019 06:36:51 +0530 Subject: [PATCH] Viewer: Allow using ctrl+wheel to change font size --- src/pyj/read_book/iframe.pyj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index 691941312c..427a59133c 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -380,7 +380,10 @@ class IframeBoss: def onwheel(self, evt): if self.content_ready: evt.preventDefault() - self.handle_wheel(evt) + if evt.deltaY and evt.ctrlKey and not evt.shiftKey and not evt.altKey and not evt.metaKey: + self.send_message('handle_shortcut', name='increase_font_size' if evt.deltaY < 0 else 'decrease_font_size') + else: + self.handle_wheel(evt) def onkeydown(self, evt): if current_layout_mode() is not 'flow' and evt.key is 'Tab':