Finish theme UI to hide options for transparent

This commit is contained in:
Tim Bentley 2009-08-31 08:05:59 +01:00
parent b6593be27f
commit 658216535c
1 changed files with 54 additions and 39 deletions

View File

@ -510,6 +510,21 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
self.VerticalComboBox.setCurrentIndex(int(self.theme.display_verticalAlign))
def stateChanging(self, theme):
if theme.background_mode == u'transparent':
self.Color1Label.setVisible(False)
self.Color1PushButton.setVisible(False)
self.Color2Label.setVisible(False)
self.Color2PushButton.setVisible(False)
self.ImageLabel.setVisible(False)
self.ImageLineEdit.setVisible(False)
self.ImageFilenameWidget.setVisible(False)
self.GradientLabel.setVisible(False)
self.GradientComboBox.setVisible(False)
self.BackgroundTypeComboBox.setVisible(False)
self.BackgroundTypeLabel.setVisible(False)
else:
self.BackgroundTypeComboBox.setVisible(True)
self.BackgroundTypeLabel.setVisible(True)
if theme.background_type == u'solid':
self.Color1PushButton.setStyleSheet(
u'background-color: %s' % unicode(theme.background_color))