mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 04:26:12 +01:00
Fix #1872518 [[Enhancement] Hide shown pages when clicking in the viewer toolbar](https://bugs.launchpad.net/calibre/+bug/1872518)
This commit is contained in:
parent
b468f72ba7
commit
244d0a2701
2 changed files with 7 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ def all_actions():
|
|||
'reference': Action('reference.png', _('Toggle Reference mode'), 'toggle_reference_mode'),
|
||||
'autoscroll': Action('auto-scroll.png', _('Toggle auto-scrolling'), 'toggle_autoscroll'),
|
||||
'lookup': Action('generic-library.png', _('Lookup words'), 'toggle_lookup'),
|
||||
'chrome': Action('tweaks.png', _('Show viewer controls'), 'show_chrome'),
|
||||
'chrome': Action('tweaks.png', _('Show viewer controls'), 'show_chrome_force'),
|
||||
'mode': Action('scroll.png', _('Toggle paged mode'), 'toggle_paged_mode'),
|
||||
'print': Action('print.png', _('Print book'), 'print'),
|
||||
'preferences': Action('config.png', _('Preferences'), 'preferences'),
|
||||
|
|
|
|||
|
|
@ -421,6 +421,8 @@ def on_handle_shortcut(self, data):
|
|||
window.history.forward()
|
||||
elif data.name is 'show_chrome':
|
||||
self.show_chrome()
|
||||
elif data.name is 'show_chrome_force':
|
||||
self.show_chrome_force()
|
||||
elif data.name is 'toggle_toc':
|
||||
ui_operations.toggle_toc()
|
||||
elif data.name is 'toggle_bookmarks':
|
||||
|
|
@ -590,6 +592,10 @@ def show_chrome(self, data):
|
|||
initial_panel = data?.initial_panel or None
|
||||
self.get_current_cfi('show-chrome', self.do_show_chrome.bind(None, elements, initial_panel))
|
||||
|
||||
def show_chrome_force(self):
|
||||
self.hide_overlays()
|
||||
self.show_chrome()
|
||||
|
||||
def do_show_chrome(self, elements, initial_panel, request_id, cfi_data):
|
||||
self.hide_overlays()
|
||||
self.update_cfi_data(cfi_data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue