From 883a4baba3751521e9532ecbc1ad68ad356c90db Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Thu, 22 Nov 2012 00:03:28 +0100 Subject: [PATCH 1/2] Turn off alternating row colors on Windows. --- openlp/core/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 647398934..5f7efea95 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -60,7 +60,7 @@ __all__ = [u'OpenLP', u'main'] log = logging.getLogger() -application_stylesheet = u""" +nt_repair_stylesheet = u""" QMainWindow::separator { border: none; @@ -128,8 +128,16 @@ class OpenLP(QtGui.QApplication): if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted: Settings().setValue(u'general/has run wizard', QtCore.QVariant(True)) + # Correct stylesheet bugs 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) + # show the splashscreen show_splash = Settings().value( u'general/show splash', QtCore.QVariant(True)).toBool() if show_splash: From 47d8bd7e5f1ec5baad8ba898d4fae5ac5c4d551d Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Thu, 22 Nov 2012 19:01:50 +0100 Subject: [PATCH 2/2] Correct indentation. --- openlp/core/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 5f7efea95..23f129ad0 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -133,8 +133,8 @@ class OpenLP(QtGui.QApplication): base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base) application_stylesheet = \ - u'* {alternate-background-color: ' + \ - base_color.name() + ';}\n' + u'* {alternate-background-color: ' + \ + base_color.name() + ';}\n' application_stylesheet += nt_repair_stylesheet self.setStyleSheet(application_stylesheet) # show the splashscreen