mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 13:24:27 +01:00
Add shortcuts to change font size
This commit is contained in:
parent
3d4dae9d08
commit
ece5180a80
3 changed files with 16 additions and 0 deletions
|
|
@ -81,4 +81,5 @@ def set_toc_anchor_map(val):
|
|||
'goto_bookpos': None,
|
||||
'delete_book': None,
|
||||
'focus_iframe': None,
|
||||
'toggle_toc': None,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,17 @@ def key_as_text(evt):
|
|||
_('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'),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -237,6 +237,10 @@ def on_handle_shortcut(self, data):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue