mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add option in preferences / Look & Feel to display the layout buttons directly on the status bar. Default is False.
This commit is contained in:
parent
af6d043375
commit
a763d7336c
@ -123,6 +123,7 @@ def create_defs():
|
|||||||
defs['tag_browser_old_look'] = False
|
defs['tag_browser_old_look'] = False
|
||||||
defs['tag_browser_hide_empty_categories'] = False
|
defs['tag_browser_hide_empty_categories'] = False
|
||||||
defs['book_list_tooltips'] = True
|
defs['book_list_tooltips'] = True
|
||||||
|
defs['show_layout_buttons'] = False
|
||||||
defs['bd_show_cover'] = True
|
defs['bd_show_cover'] = True
|
||||||
defs['bd_overlay_cover_size'] = False
|
defs['bd_overlay_cover_size'] = False
|
||||||
defs['tags_browser_category_icons'] = {}
|
defs['tags_browser_category_icons'] = {}
|
||||||
|
@ -587,15 +587,22 @@ class LayoutMixin(object): # {{{
|
|||||||
QToolButton:checked { background: rgba(0, 0, 0, 25%); }
|
QToolButton:checked { background: rgba(0, 0, 0, 25%); }
|
||||||
''')
|
''')
|
||||||
self.status_bar.addPermanentWidget(button)
|
self.status_bar.addPermanentWidget(button)
|
||||||
self.layout_button = b = QToolButton(self)
|
if gprefs['show_layout_buttons']:
|
||||||
b.setAutoRaise(True), b.setCursor(Qt.PointingHandCursor)
|
from calibre.utils.icu import primary_sort_key
|
||||||
b.setPopupMode(b.InstantPopup)
|
for b in sorted(self.layout_buttons, key=lambda b: primary_sort_key(b.label)):
|
||||||
b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
print(b.label)
|
||||||
b.setText(_('Layout')), b.setIcon(QIcon(I('config.png')))
|
b.setVisible(True)
|
||||||
b.setMenu(LayoutMenu(self))
|
self.status_bar.addPermanentWidget(b)
|
||||||
b.setToolTip(_(
|
else:
|
||||||
'Show and hide various parts of the calibre main window'))
|
self.layout_button = b = QToolButton(self)
|
||||||
self.status_bar.addPermanentWidget(b)
|
b.setAutoRaise(True), b.setCursor(Qt.PointingHandCursor)
|
||||||
|
b.setPopupMode(b.InstantPopup)
|
||||||
|
b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||||
|
b.setText(_('Layout')), b.setIcon(QIcon(I('config.png')))
|
||||||
|
b.setMenu(LayoutMenu(self))
|
||||||
|
b.setToolTip(_(
|
||||||
|
'Show and hide various parts of the calibre main window'))
|
||||||
|
self.status_bar.addPermanentWidget(b)
|
||||||
self.status_bar.addPermanentWidget(self.jobs_button)
|
self.status_bar.addPermanentWidget(self.jobs_button)
|
||||||
self.setStatusBar(self.status_bar)
|
self.setStatusBar(self.status_bar)
|
||||||
self.status_bar.update_label.linkActivated.connect(self.update_link_clicked)
|
self.status_bar.update_label.linkActivated.connect(self.update_link_clicked)
|
||||||
|
@ -348,6 +348,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
self.opt_hidpi.setVisible(False), self.label_hidpi.setVisible(False)
|
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('ui_style', gprefs, restart_required=True, choices=[(_('System default'), 'system'), (_('calibre style'), 'calibre')])
|
||||||
r('book_list_tooltips', gprefs)
|
r('book_list_tooltips', gprefs)
|
||||||
|
r('show_layout_buttons', gprefs, restart_required=True)
|
||||||
r('row_numbers_in_book_list', gprefs)
|
r('row_numbers_in_book_list', gprefs)
|
||||||
r('tag_browser_old_look', gprefs, restart_required=True)
|
r('tag_browser_old_look', gprefs, restart_required=True)
|
||||||
r('tag_browser_hide_empty_categories', gprefs)
|
r('tag_browser_hide_empty_categories', gprefs)
|
||||||
|
@ -126,6 +126,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<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>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="12" column="0">
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user