forked from openlp/openlp
Fix theme editor losing options
This commit is contained in:
parent
632570b29d
commit
a0746c0865
@ -67,6 +67,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.isLive = live
|
||||
self.alertTab = None
|
||||
self.hideMode = None
|
||||
self.override_image = None
|
||||
mainIcon = build_icon(u':/icon/openlp-logo-16x16.png')
|
||||
self.setWindowIcon(mainIcon)
|
||||
self.retranslateUi()
|
||||
@ -205,14 +206,15 @@ class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
self.imageManager.add_image(name, path)
|
||||
self.image(name)
|
||||
self.override_image = name
|
||||
|
||||
def image(self, name):
|
||||
"""
|
||||
Add an image as the background. The image is converted to a bytestream
|
||||
on route.
|
||||
Add an image as the background. The image has already been added
|
||||
to the cache.
|
||||
|
||||
`Image`
|
||||
The Image to be displayed can be QImage or QPixmap
|
||||
The name of the image to be displayed
|
||||
"""
|
||||
log.debug(u'image to display')
|
||||
image = self.imageManager.get_image_bytes(name)
|
||||
|
@ -250,25 +250,27 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
Change state as Outline check box changed
|
||||
"""
|
||||
if state == QtCore.Qt.Checked:
|
||||
self.theme.font_main_outline = True
|
||||
else:
|
||||
self.theme.font_main_outline = False
|
||||
self.outlineColorButton.setEnabled(self.theme.font_main_outline)
|
||||
self.outlineSizeSpinBox.setEnabled(self.theme.font_main_outline)
|
||||
self.calculateLines()
|
||||
if self.updateThemeAllowed:
|
||||
if state == QtCore.Qt.Checked:
|
||||
self.theme.font_main_outline = True
|
||||
else:
|
||||
self.theme.font_main_outline = False
|
||||
self.outlineColorButton.setEnabled(self.theme.font_main_outline)
|
||||
self.outlineSizeSpinBox.setEnabled(self.theme.font_main_outline)
|
||||
self.calculateLines()
|
||||
|
||||
def onShadowCheckCheckBoxStateChanged(self, state):
|
||||
"""
|
||||
Change state as Shadow check box changed
|
||||
"""
|
||||
if state == QtCore.Qt.Checked:
|
||||
self.theme.font_main_shadow = True
|
||||
else:
|
||||
self.theme.font_main_shadow = False
|
||||
self.shadowColorButton.setEnabled(self.theme.font_main_shadow)
|
||||
self.shadowSizeSpinBox.setEnabled(self.theme.font_main_shadow)
|
||||
self.calculateLines()
|
||||
if self.updateThemeAllowed:
|
||||
if state == QtCore.Qt.Checked:
|
||||
self.theme.font_main_shadow = True
|
||||
else:
|
||||
self.theme.font_main_shadow = False
|
||||
self.shadowColorButton.setEnabled(self.theme.font_main_shadow)
|
||||
self.shadowSizeSpinBox.setEnabled(self.theme.font_main_shadow)
|
||||
self.calculateLines()
|
||||
|
||||
def onMainPositionCheckBoxStateChanged(self, value):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user