diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py
index 94bcb0801..b6dd1cb27 100644
--- a/openlp/core/ui/advancedtab.py
+++ b/openlp/core/ui/advancedtab.py
@@ -41,11 +41,11 @@ class AdvancedTab(SettingsTab):
"""
Initialise the settings tab
"""
- generalTranslated = translate('AdvancedTab', 'Advanced')
- SettingsTab.__init__(self, parent ,u'Advanced', generalTranslated)
+ advancedTranslated = translate('OpenLP.AdvancedTab', 'Advanced')
self.default_image = u':/graphics/openlp-splash-screen.png'
self.default_color = u'#ffffff'
self.icon_path = u':/system/system_settings.png'
+ SettingsTab.__init__(self, parent, u'Advanced', advancedTranslated)
def setupUi(self):
"""
@@ -82,14 +82,6 @@ class AdvancedTab(SettingsTab):
u'enableAutoCloseCheckBox')
self.uiLayout.addRow(self.enableAutoCloseCheckBox)
self.leftLayout.addWidget(self.uiGroupBox)
- self.hideMouseGroupBox = QtGui.QGroupBox(self.leftColumn)
- self.hideMouseGroupBox.setObjectName(u'hideMouseGroupBox')
- self.hideMouseLayout = QtGui.QVBoxLayout(self.hideMouseGroupBox)
- self.hideMouseLayout.setObjectName(u'hideMouseLayout')
- self.hideMouseCheckBox = QtGui.QCheckBox(self.hideMouseGroupBox)
- self.hideMouseCheckBox.setObjectName(u'hideMouseCheckBox')
- self.hideMouseLayout.addWidget(self.hideMouseCheckBox)
- self.leftLayout.addWidget(self.hideMouseGroupBox)
self.leftLayout.addStretch()
self.defaultImageGroupBox = QtGui.QGroupBox(self.rightColumn)
self.defaultImageGroupBox.setObjectName(u'defaultImageGroupBox')
@@ -109,26 +101,42 @@ class AdvancedTab(SettingsTab):
self.defaultBrowseButton.setObjectName(u'defaultBrowseButton')
self.defaultBrowseButton.setIcon(
build_icon(u':/general/general_open.png'))
+ self.defaultRevertButton = QtGui.QToolButton(self.defaultImageGroupBox)
+ self.defaultRevertButton.setObjectName(u'defaultRevertButton')
+ self.defaultRevertButton.setIcon(
+ build_icon(u':/general/general_revert.png'))
self.defaultFileLayout = QtGui.QHBoxLayout()
self.defaultFileLayout.setObjectName(u'defaultFileLayout')
self.defaultFileLayout.addWidget(self.defaultFileEdit)
self.defaultFileLayout.addWidget(self.defaultBrowseButton)
+ self.defaultFileLayout.addWidget(self.defaultRevertButton)
self.defaultImageLayout.addRow(self.defaultFileLabel,
self.defaultFileLayout)
self.rightLayout.addWidget(self.defaultImageGroupBox)
+ self.hideMouseGroupBox = QtGui.QGroupBox(self.leftColumn)
+ self.hideMouseGroupBox.setObjectName(u'hideMouseGroupBox')
+ self.hideMouseLayout = QtGui.QVBoxLayout(self.hideMouseGroupBox)
+ self.hideMouseLayout.setObjectName(u'hideMouseLayout')
+ self.hideMouseCheckBox = QtGui.QCheckBox(self.hideMouseGroupBox)
+ self.hideMouseCheckBox.setObjectName(u'hideMouseCheckBox')
+ self.hideMouseLayout.addWidget(self.hideMouseCheckBox)
+ self.rightLayout.addWidget(self.hideMouseGroupBox)
self.rightLayout.addStretch()
QtCore.QObject.connect(self.defaultColorButton,
QtCore.SIGNAL(u'pressed()'), self.onDefaultColorButtonPressed)
QtCore.QObject.connect(self.defaultBrowseButton,
QtCore.SIGNAL(u'pressed()'), self.onDefaultBrowseButtonPressed)
+ QtCore.QObject.connect(self.defaultRevertButton,
+ QtCore.SIGNAL(u'pressed()'), self.onDefaultRevertButtonPressed)
def retranslateUi(self):
"""
Setup the interface translation strings.
"""
self.tabTitleVisible = UiStrings().Advanced
- self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings'))
+ self.uiGroupBox.setTitle(
+ translate('OpenLP.AdvancedTab', 'UI Settings'))
self.recentLabel.setText(
translate('OpenLP.AdvancedTab',
'Number of recent files to display:'))
@@ -150,8 +158,14 @@ class AdvancedTab(SettingsTab):
'Default Image'))
self.defaultColorLabel.setText(translate('OpenLP.AdvancedTab',
'Background color:'))
+ self.defaultColorButton.setToolTip(translate('OpenLP.AdvancedTab',
+ 'Click to select a color.'))
self.defaultFileLabel.setText(translate('OpenLP.AdvancedTab',
'Image file:'))
+ self.defaultBrowseButton.setToolTip(translate('OpenLP.AdvancedTab',
+ 'Browse for an image file to display.'))
+ self.defaultRevertButton.setToolTip(translate('OpenLP.AdvancedTab',
+ 'Revert to the default OpenLP logo.'))
def load(self):
"""
@@ -232,4 +246,8 @@ class AdvancedTab(SettingsTab):
file_filters)
if filename:
self.defaultFileEdit.setText(filename)
- self.defaultFileEdit.setFocus()
\ No newline at end of file
+ self.defaultFileEdit.setFocus()
+
+ def onDefaultRevertButtonPressed(self):
+ self.defaultFileEdit.setText(u':/graphics/openlp-splash-screen.png')
+ self.defaultFileEdit.setFocus()
diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py
index c413ec8c9..7843284b3 100644
--- a/openlp/core/ui/maindisplay.py
+++ b/openlp/core/ui/maindisplay.py
@@ -142,7 +142,8 @@ class MainDisplay(DisplayWidget):
image_file = QtCore.QSettings().value(u'advanced/default image',
QtCore.QVariant(u':/graphics/openlp-splash-screen.png'))\
.toString()
- background_color = QtGui.QColor(QtCore.QSettings().value(
+ background_color = QtGui.QColor()
+ background_color.setNamedColor(QtCore.QSettings().value(
u'advanced/default color',
QtCore.QVariant(u'#ffffff')).toString())
if not background_color.isValid():
diff --git a/resources/images/general_revert.png b/resources/images/general_revert.png
new file mode 100644
index 000000000..47d7415e2
Binary files /dev/null and b/resources/images/general_revert.png differ
diff --git a/resources/images/openlp-2.qrc b/resources/images/openlp-2.qrc
index 0d3191eff..364a75810 100644
--- a/resources/images/openlp-2.qrc
+++ b/resources/images/openlp-2.qrc
@@ -52,6 +52,7 @@
general_open.png
general_save.png
general_email.png
+ general_revert.png
slide_close.png