mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -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 @@ class View:
|
||||
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 @@ class View:
|
||||
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…
x
Reference in New Issue
Block a user