diff --git a/src/pyj/read_book/globals.pyj b/src/pyj/read_book/globals.pyj index d0f66de8b3..b058c3dfa9 100644 --- a/src/pyj/read_book/globals.pyj +++ b/src/pyj/read_book/globals.pyj @@ -81,4 +81,5 @@ ui_operations = { 'goto_bookpos': None, 'delete_book': None, 'focus_iframe': None, + 'toggle_toc': None, } diff --git a/src/pyj/read_book/shortcuts.pyj b/src/pyj/read_book/shortcuts.pyj index 19b9efb48f..0bee228ad5 100644 --- a/src/pyj/read_book/shortcuts.pyj +++ b/src/pyj/read_book/shortcuts.pyj @@ -175,6 +175,17 @@ SHORTCUTS = { _('Find previous'), ), + 'increase_font_size': desc( + v"['Ctrl+=', 'Ctrl++', 'Ctrl+Shift++', 'Ctrl+Shift+=']", + 'ui', + _('Increase font size'), + ), + + 'decrease_font_size': desc( + v"['Ctrl+-', 'Ctrl+_', 'Ctrl+Shift+-', 'Ctrl+Shift+_']", + 'ui', + _('Decrease font size'), + ), } diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index b5c6af3499..a8ad0090c6 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -237,6 +237,10 @@ class View: self.search_overlay.find_next() elif data.name is 'previous_match': self.search_overlay.find_previous() + elif data.name is 'increase_font_size': + self.bump_font_size({'increase': True}) + elif data.name is 'decrease_font_size': + self.bump_font_size({'increase': False}) def on_selection_change(self, data): self.currently_showing.selected_text = data.text