mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Add an option to keep the toolbar visible in full screen mode
This commit is contained in:
parent
27e2b265e4
commit
783e1875d3
@ -232,6 +232,10 @@ class ActionsToolBar(ToolBar):
|
||||
def update_visibility(self):
|
||||
self.setVisible(bool(get_session_pref('show_actions_toolbar', default=False)))
|
||||
|
||||
@property
|
||||
def visible_in_fullscreen(self):
|
||||
return bool(get_session_pref('show_actions_toolbar_in_fullscreen', default=False))
|
||||
|
||||
def customize(self):
|
||||
d = ConfigureToolBar(parent=self.parent())
|
||||
if d.exec_() == d.Accepted:
|
||||
|
@ -210,7 +210,8 @@ class EbookViewer(MainWindow):
|
||||
def set_full_screen(self, on):
|
||||
if on:
|
||||
self.maximized_at_last_fullscreen = self.isMaximized()
|
||||
self.actions_toolbar.setVisible(False)
|
||||
if not self.actions_toolbar.visible_in_fullscreen:
|
||||
self.actions_toolbar.setVisible(False)
|
||||
self.showFullScreen()
|
||||
else:
|
||||
self.actions_toolbar.update_visibility()
|
||||
|
@ -17,6 +17,7 @@ DEFAULTS = {
|
||||
'remember_window_geometry': False,
|
||||
'remember_last_read': True,
|
||||
'show_actions_toolbar': False,
|
||||
'show_actions_toolbar_in_fullscreen': False,
|
||||
'save_annotations_in_ebook': True,
|
||||
'singleinstance': False,
|
||||
}
|
||||
@ -50,6 +51,7 @@ def create_misc_panel(container, apply_func, cancel_func):
|
||||
container.lastChild.append(E.span('\xa0'))
|
||||
container.lastChild.append(
|
||||
create_button(_('Customize toolbar'), action=ui_operations.customize_toolbar))
|
||||
container.append(cb('show_actions_toolbar_in_fullscreen', _('Keep the toolbar in full screen mode (needs restart)')))
|
||||
container.append(cb('remember_last_read', _('Remember current page when quitting')))
|
||||
container.append(cb('save_annotations_in_ebook', _('Keep a copy of annotations/bookmarks in the e-book file, for easy sharing')))
|
||||
container.append(cb('singleinstance', _('Allow only a single instance of the viewer (needs restart)')))
|
||||
|
Loading…
x
Reference in New Issue
Block a user