mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:43:31 +02:00
...
This commit is contained in:
parent
9662f691c6
commit
9077ff9d83
3 changed files with 11 additions and 3 deletions
|
|
@ -753,7 +753,10 @@ def setup_styles(self):
|
|||
if (islinux or isbsd) and st in ('windows', 'motif', 'cde'):
|
||||
from PyQt4.Qt import QStyleFactory
|
||||
styles = set(map(unicode, QStyleFactory.keys()))
|
||||
if 'Plastique' in styles and os.environ.get('KDE_FULL_SESSION',
|
||||
if 'QtCurve' in styles and os.environ.get('KDE_FULL_SESSION',
|
||||
False):
|
||||
self.setStyle('QtCurve')
|
||||
elif 'Plastique' in styles and os.environ.get('KDE_FULL_SESSION',
|
||||
False):
|
||||
self.setStyle('Plastique')
|
||||
elif 'Cleanlooks' in styles:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt4.Qt import (QApplication, QFont, QFontInfo, QFontDialog,
|
||||
QAbstractListModel, Qt, QIcon, QKeySequence)
|
||||
QAbstractListModel, Qt, QIcon, QKeySequence, QStyleFactory)
|
||||
|
||||
from calibre.gui2.preferences import ConfigWidgetBase, test_widget, CommaSeparatedList
|
||||
from calibre.gui2.preferences.look_feel_ui import Ui_Form
|
||||
|
|
@ -104,6 +104,11 @@ def genesis(self, gui):
|
|||
r('widget_style', gprefs, restart_required=True, choices=
|
||||
[(_('System default'), 'system'), (_('Calibre style'),
|
||||
'calibre')])
|
||||
styles = set(map(unicode, QStyleFactory.keys()))
|
||||
if 'QtCurve' not in styles:
|
||||
# Can happen in linux
|
||||
for x in ('opt', 'label'):
|
||||
getattr(self, x+'_widget_style').setVisible(False)
|
||||
|
||||
r('cover_flow_queue_length', config, restart_required=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="label_widget_style">
|
||||
<property name="text">
|
||||
<string>User interface &style (needs restart):</string>
|
||||
</property>
|
||||
|
|
|
|||
Loading…
Reference in a new issue