Add an option in Preferences->Look & feel to show individual layout buttons in the status bar, as was the case in calibre 2.x

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2017-06-18 15:26:47 +05:30
commit 6a7b721dd3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 23 additions and 9 deletions

View File

@ -123,6 +123,7 @@ def create_defs():
defs['tag_browser_old_look'] = False
defs['tag_browser_hide_empty_categories'] = False
defs['book_list_tooltips'] = True
defs['show_layout_buttons'] = False
defs['bd_show_cover'] = True
defs['bd_overlay_cover_size'] = False
defs['tags_browser_category_icons'] = {}

View File

@ -587,6 +587,11 @@ class LayoutMixin(object): # {{{
QToolButton:checked { background: rgba(0, 0, 0, 25%); }
''')
self.status_bar.addPermanentWidget(button)
if gprefs['show_layout_buttons']:
for b in self.layout_buttons:
b.setVisible(True)
self.status_bar.addPermanentWidget(b)
else:
self.layout_button = b = QToolButton(self)
b.setAutoRaise(True), b.setCursor(Qt.PointingHandCursor)
b.setPopupMode(b.InstantPopup)

View File

@ -348,6 +348,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.opt_hidpi.setVisible(False), self.label_hidpi.setVisible(False)
r('ui_style', gprefs, restart_required=True, choices=[(_('System default'), 'system'), (_('calibre style'), 'calibre')])
r('book_list_tooltips', gprefs)
r('show_layout_buttons', gprefs, restart_required=True)
r('row_numbers_in_book_list', gprefs)
r('tag_browser_old_look', gprefs, restart_required=True)
r('tag_browser_hide_empty_categories', gprefs)

View File

@ -126,6 +126,13 @@
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="opt_show_layout_buttons">
<property name="text">
<string>Show &amp;layout buttons in the status bar (needs restart)</string>
</property>
</widget>
</item>
<item row="12" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">