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:
Kovid Goyal 2011-05-13 14:43:56 -06:00
parent e904b4d620
commit 517abea68e

View File

@ -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: