From c9624ab37845bd529e13f601a35d06f236ab259a Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Mon, 17 Dec 2012 20:50:09 +0100 Subject: [PATCH] Default stylesheet logic to true on Windows even without existing configuration. --- openlp/core/__init__.py | 2 +- openlp/core/ui/advancedtab.py | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 531ea2b07..32db93d15 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -125,7 +125,7 @@ class OpenLP(QtGui.QApplication): Settings().setValue(u'general/has run wizard', QtCore.QVariant(True)) # Correct stylesheet bugs application_stylesheet = u'' - if Settings().value(u'advanced/stylesheet fix', QtCore.QVariant(False)).toBool(): + if Settings().value(u'advanced/stylesheet fix', QtCore.QVariant(sys.platform.startswith(u'win'))).toBool(): base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base) alternate_background_repair_stylesheet = \ u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n' diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index af83509e6..0a4b14a15 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -501,15 +501,11 @@ class AdvancedTab(SettingsTab): self.x11BypassCheckBox.setChecked(settings.value( u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool()) # Fix for bug #936281. - if sys.platform.startswith(u'win'): - stylesheet_fix_default = True - else: - stylesheet_fix_default = False # Prevent the dialog displayed by the stylesheetFixCheckBox to display. signalsBlocked = self.stylesheetFixCheckBox.blockSignals(True) self.stylesheetFixCheckBox.setChecked(settings.value( u'stylesheet fix', QtCore.QVariant( - stylesheet_fix_default)).toBool()) + sys.platform.startswith(u'win'))).toBool()) self.stylesheetFixCheckBox.blockSignals(signalsBlocked) self.defaultColor = settings.value(u'default color', QtCore.QVariant(u'#ffffff')).toString() @@ -828,4 +824,3 @@ class AdvancedTab(SettingsTab): def onnextItemButtonClicked(self): self.slide_limits = SlideLimits.Next -