forked from openlp/openlp
Fix last commit
bzr-revno: 1281
This commit is contained in:
commit
bd20f83b4b
@ -220,11 +220,14 @@ def add_widget_completer(cache, widget):
|
|||||||
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||||
widget.setCompleter(completer)
|
widget.setCompleter(completer)
|
||||||
|
|
||||||
def create_valign_combo(parent, layout):
|
def create_valign_combo(form, parent, layout):
|
||||||
"""
|
"""
|
||||||
Creates a standard label and combo box for asking users to select a
|
Creates a standard label and combo box for asking users to select a
|
||||||
vertical alignment.
|
vertical alignment.
|
||||||
|
|
||||||
|
``form``
|
||||||
|
The UI screen that the label and combo will appear on.
|
||||||
|
|
||||||
``parent``
|
``parent``
|
||||||
The parent object. This should be a ``QWidget`` descendant.
|
The parent object. This should be a ``QWidget`` descendant.
|
||||||
|
|
||||||
@ -234,10 +237,10 @@ def create_valign_combo(parent, layout):
|
|||||||
verticalLabel = QtGui.QLabel(parent)
|
verticalLabel = QtGui.QLabel(parent)
|
||||||
verticalLabel.setObjectName(u'VerticalLabel')
|
verticalLabel.setObjectName(u'VerticalLabel')
|
||||||
verticalLabel.setText(translate('OpenLP.Ui', '&Vertical Align:'))
|
verticalLabel.setText(translate('OpenLP.Ui', '&Vertical Align:'))
|
||||||
verticalComboBox = QtGui.QComboBox(parent)
|
form.verticalComboBox = QtGui.QComboBox(parent)
|
||||||
verticalComboBox.setObjectName(u'VerticalComboBox')
|
form.verticalComboBox.setObjectName(u'VerticalComboBox')
|
||||||
verticalComboBox.addItem(translate('OpenLP.Ui', 'Top'))
|
form.verticalComboBox.addItem(translate('OpenLP.Ui', 'Top'))
|
||||||
verticalComboBox.addItem(translate('OpenLP.Ui', 'Middle'))
|
form.verticalComboBox.addItem(translate('OpenLP.Ui', 'Middle'))
|
||||||
verticalComboBox.addItem(translate('OpenLP.Ui', 'Bottom'))
|
form.verticalComboBox.addItem(translate('OpenLP.Ui', 'Bottom'))
|
||||||
verticalLabel.setBuddy(verticalComboBox)
|
verticalLabel.setBuddy(form.verticalComboBox)
|
||||||
layout.addRow(verticalLabel, verticalComboBox)
|
layout.addRow(verticalLabel, form.verticalComboBox)
|
||||||
|
@ -242,7 +242,8 @@ class Ui_ThemeWizard(object):
|
|||||||
self.horizontalComboBox.setObjectName(u'HorizontalComboBox')
|
self.horizontalComboBox.setObjectName(u'HorizontalComboBox')
|
||||||
self.alignmentLayout.addRow(self.horizontalLabel,
|
self.alignmentLayout.addRow(self.horizontalLabel,
|
||||||
self.horizontalComboBox)
|
self.horizontalComboBox)
|
||||||
create_valign_combo(self.alignmentPage, self.alignmentLayout)
|
create_valign_combo(themeWizard, self.alignmentPage,
|
||||||
|
self.alignmentLayout)
|
||||||
self.transitionsLabel = QtGui.QLabel(self.alignmentPage)
|
self.transitionsLabel = QtGui.QLabel(self.alignmentPage)
|
||||||
self.transitionsLabel.setObjectName(u'TransitionsLabel')
|
self.transitionsLabel.setObjectName(u'TransitionsLabel')
|
||||||
self.transitionsCheckBox = QtGui.QCheckBox(self.alignmentPage)
|
self.transitionsCheckBox = QtGui.QCheckBox(self.alignmentPage)
|
||||||
|
@ -76,7 +76,7 @@ class AlertsTab(SettingsTab):
|
|||||||
self.TimeoutSpinBox.setMaximum(180)
|
self.TimeoutSpinBox.setMaximum(180)
|
||||||
self.TimeoutSpinBox.setObjectName(u'TimeoutSpinBox')
|
self.TimeoutSpinBox.setObjectName(u'TimeoutSpinBox')
|
||||||
self.fontLayout.addRow(self.TimeoutLabel, self.TimeoutSpinBox)
|
self.fontLayout.addRow(self.TimeoutLabel, self.TimeoutSpinBox)
|
||||||
create_valign_combo(self.fontGroupBox, self.fontLayout)
|
create_valign_combo(self, self.fontGroupBox, self.fontLayout)
|
||||||
self.leftLayout.addWidget(self.fontGroupBox)
|
self.leftLayout.addWidget(self.fontGroupBox)
|
||||||
self.leftLayout.addStretch()
|
self.leftLayout.addStretch()
|
||||||
self.PreviewGroupBox = QtGui.QGroupBox(self.rightColumn)
|
self.PreviewGroupBox = QtGui.QGroupBox(self.rightColumn)
|
||||||
@ -171,7 +171,7 @@ class AlertsTab(SettingsTab):
|
|||||||
u'background-color: %s' % self.font_color)
|
u'background-color: %s' % self.font_color)
|
||||||
self.BackgroundColorButton.setStyleSheet(
|
self.BackgroundColorButton.setStyleSheet(
|
||||||
u'background-color: %s' % self.bg_color)
|
u'background-color: %s' % self.bg_color)
|
||||||
self.LocationComboBox.setCurrentIndex(self.location)
|
self.verticalComboBox.setCurrentIndex(self.location)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily(self.font_face)
|
font.setFamily(self.font_face)
|
||||||
self.FontComboBox.setCurrentFont(font)
|
self.FontComboBox.setCurrentFont(font)
|
||||||
@ -186,7 +186,7 @@ class AlertsTab(SettingsTab):
|
|||||||
self.font_face = self.FontComboBox.currentFont().family()
|
self.font_face = self.FontComboBox.currentFont().family()
|
||||||
settings.setValue(u'font face', QtCore.QVariant(self.font_face))
|
settings.setValue(u'font face', QtCore.QVariant(self.font_face))
|
||||||
settings.setValue(u'timeout', QtCore.QVariant(self.timeout))
|
settings.setValue(u'timeout', QtCore.QVariant(self.timeout))
|
||||||
self.location = self.LocationComboBox.currentIndex()
|
self.location = self.verticalComboBox.currentIndex()
|
||||||
settings.setValue(u'location', QtCore.QVariant(self.location))
|
settings.setValue(u'location', QtCore.QVariant(self.location))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user