mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9662f691c6
commit
9077ff9d83
@ -753,7 +753,10 @@ class Application(QApplication):
|
|||||||
if (islinux or isbsd) and st in ('windows', 'motif', 'cde'):
|
if (islinux or isbsd) and st in ('windows', 'motif', 'cde'):
|
||||||
from PyQt4.Qt import QStyleFactory
|
from PyQt4.Qt import QStyleFactory
|
||||||
styles = set(map(unicode, QStyleFactory.keys()))
|
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):
|
False):
|
||||||
self.setStyle('Plastique')
|
self.setStyle('Plastique')
|
||||||
elif 'Cleanlooks' in styles:
|
elif 'Cleanlooks' in styles:
|
||||||
|
@ -6,7 +6,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
from PyQt4.Qt import (QApplication, QFont, QFontInfo, QFontDialog,
|
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 import ConfigWidgetBase, test_widget, CommaSeparatedList
|
||||||
from calibre.gui2.preferences.look_feel_ui import Ui_Form
|
from calibre.gui2.preferences.look_feel_ui import Ui_Form
|
||||||
@ -104,6 +104,11 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
r('widget_style', gprefs, restart_required=True, choices=
|
r('widget_style', gprefs, restart_required=True, choices=
|
||||||
[(_('System default'), 'system'), (_('Calibre style'),
|
[(_('System default'), 'system'), (_('Calibre style'),
|
||||||
'calibre')])
|
'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)
|
r('cover_flow_queue_length', config, restart_required=True)
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_widget_style">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>User interface &style (needs restart):</string>
|
<string>User interface &style (needs restart):</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user