forked from openlp/openlp
Rename stylesheetFix -> alternateRows.
This commit is contained in:
parent
34bec28074
commit
cf36197993
@ -125,11 +125,11 @@ class OpenLP(QtGui.QApplication):
|
|||||||
Settings().setValue(u'general/has run wizard', QtCore.QVariant(True))
|
Settings().setValue(u'general/has run wizard', QtCore.QVariant(True))
|
||||||
# Correct stylesheet bugs
|
# Correct stylesheet bugs
|
||||||
application_stylesheet = u''
|
application_stylesheet = u''
|
||||||
if Settings().value(u'advanced/stylesheet fix', QtCore.QVariant(sys.platform.startswith(u'win'))).toBool():
|
if Settings().value(u'advanced/alternate rows', QtCore.QVariant(sys.platform.startswith(u'win'))).toBool():
|
||||||
base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base)
|
base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base)
|
||||||
alternate_background_repair_stylesheet = \
|
alternate_rows_repair_stylesheet = \
|
||||||
u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
|
u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
|
||||||
application_stylesheet += alternate_background_repair_stylesheet
|
application_stylesheet += alternate_rows_repair_stylesheet
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
application_stylesheet += nt_repair_stylesheet
|
application_stylesheet += nt_repair_stylesheet
|
||||||
if application_stylesheet:
|
if application_stylesheet:
|
||||||
|
@ -284,9 +284,9 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.x11BypassCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
|
self.x11BypassCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
|
||||||
self.x11BypassCheckBox.setObjectName(u'x11BypassCheckBox')
|
self.x11BypassCheckBox.setObjectName(u'x11BypassCheckBox')
|
||||||
self.workaroundLayout.addWidget(self.x11BypassCheckBox)
|
self.workaroundLayout.addWidget(self.x11BypassCheckBox)
|
||||||
self.stylesheetFixCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
|
self.alternateRowsCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
|
||||||
self.stylesheetFixCheckBox.setObjectName(u'stylesheetFixCheckBox')
|
self.alternateRowsCheckBox.setObjectName(u'alternateRowsCheckBox')
|
||||||
self.workaroundLayout.addWidget(self.stylesheetFixCheckBox)
|
self.workaroundLayout.addWidget(self.alternateRowsCheckBox)
|
||||||
self.rightLayout.addWidget(self.workaroundGroupBox)
|
self.rightLayout.addWidget(self.workaroundGroupBox)
|
||||||
self.rightLayout.addStretch()
|
self.rightLayout.addStretch()
|
||||||
self.shouldUpdateServiceNameExample = False
|
self.shouldUpdateServiceNameExample = False
|
||||||
@ -312,8 +312,8 @@ class AdvancedTab(SettingsTab):
|
|||||||
QtCore.SIGNAL(u'clicked()'), self.onDefaultRevertButtonClicked)
|
QtCore.SIGNAL(u'clicked()'), self.onDefaultRevertButtonClicked)
|
||||||
QtCore.QObject.connect(self.x11BypassCheckBox,
|
QtCore.QObject.connect(self.x11BypassCheckBox,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), self.onX11BypassCheckBoxToggled)
|
QtCore.SIGNAL(u'toggled(bool)'), self.onX11BypassCheckBoxToggled)
|
||||||
QtCore.QObject.connect(self.stylesheetFixCheckBox,
|
QtCore.QObject.connect(self.alternateRowsCheckBox,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), self.onStylesheetFixCheckBoxToggled)
|
QtCore.SIGNAL(u'toggled(bool)'), self.onAlternateRowsCheckBoxToggled)
|
||||||
QtCore.QObject.connect(self.dataDirectoryBrowseButton,
|
QtCore.QObject.connect(self.dataDirectoryBrowseButton,
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
QtCore.SIGNAL(u'clicked()'),
|
||||||
self.onDataDirectoryBrowseButtonClicked)
|
self.onDataDirectoryBrowseButtonClicked)
|
||||||
@ -433,7 +433,7 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.workaroundGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'Workarounds'))
|
self.workaroundGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'Workarounds'))
|
||||||
self.x11BypassCheckBox.setText(translate('OpenLP.AdvancedTab',
|
self.x11BypassCheckBox.setText(translate('OpenLP.AdvancedTab',
|
||||||
'Bypass X11 Window Manager'))
|
'Bypass X11 Window Manager'))
|
||||||
self.stylesheetFixCheckBox.setText(translate('OpenLP.AdvancedTab',
|
self.alternateRowsCheckBox.setText(translate('OpenLP.AdvancedTab',
|
||||||
'Disable alternating row colors in lists'))
|
'Disable alternating row colors in lists'))
|
||||||
# Slide Limits
|
# Slide Limits
|
||||||
self.slideGroupBox.setTitle(
|
self.slideGroupBox.setTitle(
|
||||||
@ -501,12 +501,12 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.x11BypassCheckBox.setChecked(settings.value(
|
self.x11BypassCheckBox.setChecked(settings.value(
|
||||||
u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool())
|
u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool())
|
||||||
# Fix for bug #936281.
|
# Fix for bug #936281.
|
||||||
# Prevent the dialog displayed by the stylesheetFixCheckBox to display.
|
# Prevent the dialog displayed by the alternateRowsCheckBox to display.
|
||||||
signalsBlocked = self.stylesheetFixCheckBox.blockSignals(True)
|
signalsBlocked = self.alternateRowsCheckBox.blockSignals(True)
|
||||||
self.stylesheetFixCheckBox.setChecked(settings.value(
|
self.alternateRowsCheckBox.setChecked(settings.value(
|
||||||
u'stylesheet fix', QtCore.QVariant(
|
u'alternate rows', QtCore.QVariant(
|
||||||
sys.platform.startswith(u'win'))).toBool())
|
sys.platform.startswith(u'win'))).toBool())
|
||||||
self.stylesheetFixCheckBox.blockSignals(signalsBlocked)
|
self.alternateRowsCheckBox.blockSignals(signalsBlocked)
|
||||||
self.defaultColor = settings.value(u'default color',
|
self.defaultColor = settings.value(u'default color',
|
||||||
QtCore.QVariant(u'#ffffff')).toString()
|
QtCore.QVariant(u'#ffffff')).toString()
|
||||||
self.defaultFileEdit.setText(settings.value(u'default image',
|
self.defaultFileEdit.setText(settings.value(u'default image',
|
||||||
@ -597,8 +597,8 @@ class AdvancedTab(SettingsTab):
|
|||||||
QtCore.QVariant(self.hideMouseCheckBox.isChecked()))
|
QtCore.QVariant(self.hideMouseCheckBox.isChecked()))
|
||||||
settings.setValue(u'x11 bypass wm',
|
settings.setValue(u'x11 bypass wm',
|
||||||
QtCore.QVariant(self.x11BypassCheckBox.isChecked()))
|
QtCore.QVariant(self.x11BypassCheckBox.isChecked()))
|
||||||
settings.setValue(u'stylesheet fix',
|
settings.setValue(u'alternate rows',
|
||||||
QtCore.QVariant(self.stylesheetFixCheckBox.isChecked()))
|
QtCore.QVariant(self.alternateRowsCheckBox.isChecked()))
|
||||||
settings.setValue(u'default color', self.defaultColor)
|
settings.setValue(u'default color', self.defaultColor)
|
||||||
settings.setValue(u'default image', self.defaultFileEdit.text())
|
settings.setValue(u'default image', self.defaultFileEdit.text())
|
||||||
settings.setValue(u'slide limits', QtCore.QVariant(self.slide_limits))
|
settings.setValue(u'slide limits', QtCore.QVariant(self.slide_limits))
|
||||||
@ -804,7 +804,7 @@ class AdvancedTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
self.displayChanged = True
|
self.displayChanged = True
|
||||||
|
|
||||||
def onStylesheetFixCheckBoxToggled(self, checked):
|
def onAlternateRowsCheckBoxToggled(self, checked):
|
||||||
"""
|
"""
|
||||||
Notify user about required restart.
|
Notify user about required restart.
|
||||||
|
|
||||||
@ -814,7 +814,7 @@ class AdvancedTab(SettingsTab):
|
|||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
translate('OpenLP.AdvancedTab', 'Restart Required'),
|
translate('OpenLP.AdvancedTab', 'Restart Required'),
|
||||||
translate('OpenLP.AdvancedTab',
|
translate('OpenLP.AdvancedTab',
|
||||||
'The change will take effect when OpenLP is restarted.'))
|
'This change will only take effect once OpenLP has been restarted.'))
|
||||||
|
|
||||||
def onEndSlideButtonClicked(self):
|
def onEndSlideButtonClicked(self):
|
||||||
self.slide_limits = SlideLimits.End
|
self.slide_limits = SlideLimits.End
|
||||||
|
Loading…
Reference in New Issue
Block a user