Remove alternating row colours on Windows OS. No configuration.

bzr-revno: 2115
This commit is contained in:
Patrick Zimmermann 2012-11-22 21:43:12 +00:00 committed by Tim Bentley
commit 29bf4ce753

View File

@ -60,7 +60,7 @@ __all__ = [u'OpenLP', u'main']
log = logging.getLogger() log = logging.getLogger()
application_stylesheet = u""" nt_repair_stylesheet = u"""
QMainWindow::separator QMainWindow::separator
{ {
border: none; border: none;
@ -128,8 +128,16 @@ class OpenLP(QtGui.QApplication):
if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted: if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
Settings().setValue(u'general/has run wizard', Settings().setValue(u'general/has run wizard',
QtCore.QVariant(True)) QtCore.QVariant(True))
# Correct stylesheet bugs
if os.name == u'nt': if os.name == u'nt':
base_color = self.palette().color(QtGui.QPalette.Active,
QtGui.QPalette.Base)
application_stylesheet = \
u'* {alternate-background-color: ' + \
base_color.name() + ';}\n'
application_stylesheet += nt_repair_stylesheet
self.setStyleSheet(application_stylesheet) self.setStyleSheet(application_stylesheet)
# show the splashscreen
show_splash = Settings().value( show_splash = Settings().value(
u'general/show splash', QtCore.QVariant(True)).toBool() u'general/show splash', QtCore.QVariant(True)).toBool()
if show_splash: if show_splash: