- fixed footer size being reset after changing the footer colour as reported here [0]

- same for footer font

[0] http://openlp.org/de/forums/openlp_20/general_discussion/problem_on_setting_footer.html_0

bzr-revno: 1452
This commit is contained in:
Andreas Preikschat 2011-04-11 15:55:10 +02:00
commit d43a652791
1 changed files with 20 additions and 31 deletions

View File

@ -63,26 +63,19 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
QtCore.SIGNAL(u'currentIndexChanged(int)'), QtCore.SIGNAL(u'currentIndexChanged(int)'),
self.onGradientComboBoxCurrentIndexChanged) self.onGradientComboBoxCurrentIndexChanged)
QtCore.QObject.connect(self.colorButton, QtCore.QObject.connect(self.colorButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onColorButtonClicked)
self.onColorButtonClicked)
QtCore.QObject.connect(self.gradientStartButton, QtCore.QObject.connect(self.gradientStartButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onGradientStartButtonClicked)
self.onGradientStartButtonClicked)
QtCore.QObject.connect(self.gradientEndButton, QtCore.QObject.connect(self.gradientEndButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onGradientEndButtonClicked)
self.onGradientEndButtonClicked)
QtCore.QObject.connect(self.imageBrowseButton, QtCore.QObject.connect(self.imageBrowseButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onImageBrowseButtonClicked)
self.onImageBrowseButtonClicked)
QtCore.QObject.connect(self.mainColorButton, QtCore.QObject.connect(self.mainColorButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onMainColorButtonClicked)
self.onMainColorButtonClicked)
QtCore.QObject.connect(self.outlineColorButton, QtCore.QObject.connect(self.outlineColorButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onOutlineColorButtonClicked)
self.onOutlineColorButtonClicked)
QtCore.QObject.connect(self.shadowColorButton, QtCore.QObject.connect(self.shadowColorButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onShadowColorButtonClicked)
self.onShadowColorButtonClicked)
QtCore.QObject.connect(self.outlineCheckBox, QtCore.QObject.connect(self.outlineCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), QtCore.SIGNAL(u'stateChanged(int)'),
self.onOutlineCheckCheckBoxStateChanged) self.onOutlineCheckCheckBoxStateChanged)
@ -90,8 +83,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
QtCore.SIGNAL(u'stateChanged(int)'), QtCore.SIGNAL(u'stateChanged(int)'),
self.onShadowCheckCheckBoxStateChanged) self.onShadowCheckCheckBoxStateChanged)
QtCore.QObject.connect(self.footerColorButton, QtCore.QObject.connect(self.footerColorButton,
QtCore.SIGNAL(u'clicked()'), QtCore.SIGNAL(u'clicked()'), self.onFooterColorButtonClicked)
self.onFooterColorButtonClicked)
QtCore.QObject.connect(self.mainPositionCheckBox, QtCore.QObject.connect(self.mainPositionCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), QtCore.SIGNAL(u'stateChanged(int)'),
self.onMainPositionCheckBoxStateChanged) self.onMainPositionCheckBoxStateChanged)
@ -99,26 +91,23 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
QtCore.SIGNAL(u'stateChanged(int)'), QtCore.SIGNAL(u'stateChanged(int)'),
self.onFooterPositionCheckBoxStateChanged) self.onFooterPositionCheckBoxStateChanged)
QtCore.QObject.connect(self, QtCore.QObject.connect(self,
QtCore.SIGNAL(u'currentIdChanged(int)'), QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
self.onCurrentIdChanged)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_line_count'), QtCore.SIGNAL(u'theme_line_count'), self.updateLinesText)
self.updateLinesText)
QtCore.QObject.connect(self.mainSizeSpinBox, QtCore.QObject.connect(self.mainSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
self.calculateLines)
QtCore.QObject.connect(self.lineSpacingSpinBox, QtCore.QObject.connect(self.lineSpacingSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
self.calculateLines)
QtCore.QObject.connect(self.outlineSizeSpinBox, QtCore.QObject.connect(self.outlineSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
self.calculateLines)
QtCore.QObject.connect(self.shadowSizeSpinBox, QtCore.QObject.connect(self.shadowSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
self.calculateLines)
QtCore.QObject.connect(self.mainFontComboBox, QtCore.QObject.connect(self.mainFontComboBox,
QtCore.SIGNAL(u'activated(int)'), QtCore.SIGNAL(u'activated(int)'), self.calculateLines)
self.calculateLines) QtCore.QObject.connect(self.footerFontComboBox,
QtCore.SIGNAL(u'activated(int)'), self.updateTheme)
QtCore.QObject.connect(self.footerSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), self.updateTheme)
def setDefaults(self): def setDefaults(self):
""" """
@ -389,7 +378,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
Handle the display and state of the Footer Area page. Handle the display and state of the Footer Area page.
""" """
self.footerFontComboBox.setCurrentFont( self.footerFontComboBox.setCurrentFont(
QtGui.QFont(self.theme.font_main_name)) QtGui.QFont(self.theme.font_footer_name))
self.footerColorButton.setStyleSheet(u'background-color: %s' % self.footerColorButton.setStyleSheet(u'background-color: %s' %
self.theme.font_footer_color) self.theme.font_footer_color)
self.setField(u'footerSizeSpinBox', self.setField(u'footerSizeSpinBox',