mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Disable toolbar icons, forces icon text to be displayed when enabled.
This commit is contained in:
parent
05eb542f50
commit
f1210c3444
@ -264,11 +264,11 @@ class ToolBar(QToolBar): # {{{
|
|||||||
|
|
||||||
def apply_settings(self):
|
def apply_settings(self):
|
||||||
sz = gprefs['toolbar_icon_size']
|
sz = gprefs['toolbar_icon_size']
|
||||||
sz = {'small':24, 'medium':48, 'large':64}[sz]
|
sz = {'off':0, 'small':24, 'medium':48, 'large':64}[sz]
|
||||||
self.setIconSize(QSize(sz, sz))
|
self.setIconSize(QSize(sz, sz))
|
||||||
self.child_bar.setIconSize(QSize(sz, sz))
|
self.child_bar.setIconSize(QSize(sz, sz))
|
||||||
style = Qt.ToolButtonTextUnderIcon
|
style = Qt.ToolButtonTextUnderIcon
|
||||||
if gprefs['toolbar_text'] == 'never':
|
if sz > 0 and gprefs['toolbar_text'] == 'never':
|
||||||
style = Qt.ToolButtonIconOnly
|
style = Qt.ToolButtonIconOnly
|
||||||
self.setToolButtonStyle(style)
|
self.setToolButtonStyle(style)
|
||||||
self.child_bar.setToolButtonStyle(style)
|
self.child_bar.setToolButtonStyle(style)
|
||||||
|
@ -49,8 +49,8 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
r('use_roman_numerals_for_series_number', config)
|
r('use_roman_numerals_for_series_number', config)
|
||||||
r('separate_cover_flow', config, restart_required=True)
|
r('separate_cover_flow', config, restart_required=True)
|
||||||
|
|
||||||
choices = [(_('Small'), 'small'), (_('Medium'), 'medium'),
|
choices = [(_('Off'), 'off'), (_('Small'), 'small'),
|
||||||
(_('Large'), 'large')]
|
(_('Medium'), 'medium'), (_('Large'), 'large')]
|
||||||
r('toolbar_icon_size', gprefs, choices=choices)
|
r('toolbar_icon_size', gprefs, choices=choices)
|
||||||
|
|
||||||
choices = [(_('Automatic'), 'auto'), (_('Always'), 'always'),
|
choices = [(_('Automatic'), 'auto'), (_('Always'), 'always'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user