mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux binaries: Always use either Cleanlook or Plastique styles for the GUI if no style can be loaded from the host computer
This commit is contained in:
parent
e904b4d620
commit
517abea68e
@ -625,6 +625,16 @@ class Application(QApplication):
|
||||
if s is not None:
|
||||
font.setStretch(s)
|
||||
QApplication.setFont(font)
|
||||
st = self.style()
|
||||
if st is not None:
|
||||
st = unicode(st.objectName()).lower()
|
||||
if (islinux or isfreebsd) and st in ('windows', 'motif', 'cde'):
|
||||
from PyQt4.Qt import QStyleFactory
|
||||
styles = set(map(unicode, QStyleFactory.keys()))
|
||||
if 'Cleanlooks' in styles:
|
||||
self.setStyle('Cleanlooks')
|
||||
else:
|
||||
self.setStyle('Plastique')
|
||||
|
||||
def _send_file_open_events(self):
|
||||
with self._file_open_lock:
|
||||
|
Loading…
x
Reference in New Issue
Block a user