mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not require a restart to change the show layout buttons setting
This commit is contained in:
parent
11feacf4f5
commit
8c45539904
@ -391,7 +391,6 @@ class CentralContainer(QWidget):
|
||||
return False
|
||||
gui.book_details.vertical = is_wide
|
||||
self.layout = layout
|
||||
gui.place_layout_buttons()
|
||||
self.write_settings()
|
||||
self.relayout()
|
||||
return True
|
||||
|
@ -498,6 +498,7 @@ class LayoutMixin: # {{{
|
||||
for button in reversed(self.layout_buttons):
|
||||
self.status_bar.insertPermanentWidget(1, button)
|
||||
self.layout_button.setMenu(LayoutMenu(self))
|
||||
self.layout_button.setVisible(not gprefs['show_layout_buttons'])
|
||||
|
||||
def init_layout_mixin(self):
|
||||
self.vl_tabs = VLTabs(self)
|
||||
@ -549,7 +550,6 @@ class LayoutMixin: # {{{
|
||||
b.setToolTip(_(
|
||||
'Show and hide various parts of the calibre main window'))
|
||||
self.status_bar.addPermanentWidget(b)
|
||||
b.setVisible(not gprefs['show_layout_buttons'])
|
||||
self.status_bar.addPermanentWidget(self.jobs_button)
|
||||
self.setStatusBar(self.status_bar)
|
||||
self.status_bar.update_label.linkActivated.connect(self.update_link_clicked)
|
||||
|
@ -582,7 +582,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
r('book_list_tooltips', gprefs)
|
||||
r('dnd_merge', gprefs)
|
||||
r('wrap_toolbar_text', gprefs, restart_required=True)
|
||||
r('show_layout_buttons', gprefs, restart_required=True)
|
||||
r('show_layout_buttons', gprefs)
|
||||
r('row_numbers_in_book_list', gprefs)
|
||||
r('tag_browser_old_look', gprefs)
|
||||
r('tag_browser_hide_empty_categories', gprefs)
|
||||
@ -1182,6 +1182,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
|
||||
def refresh_gui(self, gui):
|
||||
gui.book_details.book_info.refresh_css()
|
||||
gui.place_layout_buttons()
|
||||
m = gui.library_view.model()
|
||||
m.update_db_prefs_cache()
|
||||
m.beginResetModel(), m.endResetModel()
|
||||
|
@ -31,7 +31,7 @@
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="opt_show_layout_buttons">
|
||||
<property name="text">
|
||||
<string>Show &layout buttons in the status bar (needs restart)</string>
|
||||
<string>Show &layout buttons in the status bar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user