forked from openlp/openlp
Cleanup import wizard spacers
This commit is contained in:
parent
842e4ba5f3
commit
1ecaab4fa9
@ -157,13 +157,10 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.formatComboBox.addItems([u'', u'', u'', u'', u''])
|
self.formatComboBox.addItems([u'', u'', u'', u'', u''])
|
||||||
self.formatComboBox.setObjectName(u'FormatComboBox')
|
self.formatComboBox.setObjectName(u'FormatComboBox')
|
||||||
self.formatLayout.addRow(self.formatLabel, self.formatComboBox)
|
self.formatLayout.addRow(self.formatLabel, self.formatComboBox)
|
||||||
self.formatSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||||
QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Minimum)
|
||||||
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.formatSpacer)
|
|
||||||
self.selectPageLayout.addLayout(self.formatLayout)
|
self.selectPageLayout.addLayout(self.formatLayout)
|
||||||
self.typeSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
|
||||||
QtGui.QSizePolicy.Minimum)
|
|
||||||
self.selectStack = QtGui.QStackedLayout()
|
self.selectStack = QtGui.QStackedLayout()
|
||||||
self.selectStack.setObjectName(u'SelectStack')
|
self.selectStack.setObjectName(u'SelectStack')
|
||||||
self.osisWidget = QtGui.QWidget(self.selectPage)
|
self.osisWidget = QtGui.QWidget(self.selectPage)
|
||||||
@ -183,7 +180,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.osisBrowseButton.setObjectName(u'OsisBrowseButton')
|
self.osisBrowseButton.setObjectName(u'OsisBrowseButton')
|
||||||
self.osisFileLayout.addWidget(self.osisBrowseButton)
|
self.osisFileLayout.addWidget(self.osisBrowseButton)
|
||||||
self.osisLayout.addRow(self.osisFileLabel, self.osisFileLayout)
|
self.osisLayout.addRow(self.osisFileLabel, self.osisFileLayout)
|
||||||
self.osisLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.typeSpacer)
|
self.osisLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.selectStack.addWidget(self.osisWidget)
|
self.selectStack.addWidget(self.osisWidget)
|
||||||
self.csvWidget = QtGui.QWidget(self.selectPage)
|
self.csvWidget = QtGui.QWidget(self.selectPage)
|
||||||
self.csvWidget.setObjectName(u'CsvWidget')
|
self.csvWidget.setObjectName(u'CsvWidget')
|
||||||
@ -226,7 +223,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.csvVersesButton.setObjectName(u'CsvVersesButton')
|
self.csvVersesButton.setObjectName(u'CsvVersesButton')
|
||||||
self.csvVersesLayout.addWidget(self.csvVersesButton)
|
self.csvVersesLayout.addWidget(self.csvVersesButton)
|
||||||
self.csvLayout.addRow(self.csvVersesLabel, self.csvVersesLayout)
|
self.csvLayout.addRow(self.csvVersesLabel, self.csvVersesLayout)
|
||||||
self.csvLayout.setItem(3, QtGui.QFormLayout.LabelRole, self.typeSpacer)
|
self.csvLayout.setItem(3, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.selectStack.addWidget(self.csvWidget)
|
self.selectStack.addWidget(self.csvWidget)
|
||||||
self.openSongWidget = QtGui.QWidget(self.selectPage)
|
self.openSongWidget = QtGui.QWidget(self.selectPage)
|
||||||
self.openSongWidget.setObjectName(u'OpenSongWidget')
|
self.openSongWidget.setObjectName(u'OpenSongWidget')
|
||||||
@ -246,8 +243,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.openSongFileLayout.addWidget(self.openSongBrowseButton)
|
self.openSongFileLayout.addWidget(self.openSongBrowseButton)
|
||||||
self.openSongLayout.addRow(self.openSongFileLabel,
|
self.openSongLayout.addRow(self.openSongFileLabel,
|
||||||
self.openSongFileLayout)
|
self.openSongFileLayout)
|
||||||
self.openSongLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
self.openSongLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.typeSpacer)
|
|
||||||
self.selectStack.addWidget(self.openSongWidget)
|
self.selectStack.addWidget(self.openSongWidget)
|
||||||
self.webTabWidget = QtGui.QTabWidget(self.selectPage)
|
self.webTabWidget = QtGui.QTabWidget(self.selectPage)
|
||||||
self.webTabWidget.setObjectName(u'WebTabWidget')
|
self.webTabWidget.setObjectName(u'WebTabWidget')
|
||||||
@ -326,8 +322,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.openlp1DisabledLabel.setWordWrap(True)
|
self.openlp1DisabledLabel.setWordWrap(True)
|
||||||
self.openlp1DisabledLabel.setObjectName(u'Openlp1DisabledLabel')
|
self.openlp1DisabledLabel.setObjectName(u'Openlp1DisabledLabel')
|
||||||
self.openlp1Layout.addRow(self.openlp1DisabledLabel)
|
self.openlp1Layout.addRow(self.openlp1DisabledLabel)
|
||||||
self.openlp1Layout.setItem(1, QtGui.QFormLayout.LabelRole,
|
self.openlp1Layout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.typeSpacer)
|
|
||||||
self.selectStack.addWidget(self.openlp1Widget)
|
self.selectStack.addWidget(self.openlp1Widget)
|
||||||
self.selectPageLayout.addLayout(self.selectStack)
|
self.selectPageLayout.addLayout(self.selectStack)
|
||||||
self.addPage(self.selectPage)
|
self.addPage(self.selectPage)
|
||||||
@ -461,9 +456,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.csvVersesLabel.minimumSizeHint().width(),
|
self.csvVersesLabel.minimumSizeHint().width(),
|
||||||
self.openSongFileLabel.minimumSizeHint().width(),
|
self.openSongFileLabel.minimumSizeHint().width(),
|
||||||
self.openlp1FileLabel.minimumSizeHint().width())
|
self.openlp1FileLabel.minimumSizeHint().width())
|
||||||
self.formatSpacer.changeSize(labelWidth, 0,
|
self.spacer.changeSize(labelWidth, 0,
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
|
||||||
self.typeSpacer.changeSize(labelWidth, 0,
|
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||||
|
|
||||||
def validateCurrentPage(self):
|
def validateCurrentPage(self):
|
||||||
|
@ -162,6 +162,8 @@ class SongImportForm(OpenLPWizard):
|
|||||||
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||||
self.formatSpacer)
|
self.formatSpacer)
|
||||||
self.sourceLayout.addLayout(self.formatLayout)
|
self.sourceLayout.addLayout(self.formatLayout)
|
||||||
|
self.stackSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||||
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.formatStack = QtGui.QStackedLayout()
|
self.formatStack = QtGui.QStackedLayout()
|
||||||
self.formatStack.setObjectName(u'FormatStack')
|
self.formatStack.setObjectName(u'FormatStack')
|
||||||
# OpenLP 2.0
|
# OpenLP 2.0
|
||||||
@ -807,10 +809,8 @@ class SongImportForm(OpenLPWizard):
|
|||||||
browseButton.setIcon(self.openIcon)
|
browseButton.setIcon(self.openIcon)
|
||||||
browseButton.setObjectName(obj_prefix + u'BrowseButton')
|
browseButton.setObjectName(obj_prefix + u'BrowseButton')
|
||||||
fileLayout.addWidget(browseButton)
|
fileLayout.addWidget(browseButton)
|
||||||
formSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
importLayout.addLayout(fileLayout)
|
importLayout.addLayout(fileLayout)
|
||||||
importLayout.addSpacerItem(formSpacer)
|
importLayout.addSpacerItem(self.stackSpacer)
|
||||||
else:
|
else:
|
||||||
fileListWidget = QtGui.QListWidget(importWidget)
|
fileListWidget = QtGui.QListWidget(importWidget)
|
||||||
fileListWidget.setSelectionMode(
|
fileListWidget.setSelectionMode(
|
||||||
@ -859,6 +859,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
disabledLabel.setWordWrap(True)
|
disabledLabel.setWordWrap(True)
|
||||||
disabledLabel.setObjectName(obj_prefix + u'DisabledLabel')
|
disabledLabel.setObjectName(obj_prefix + u'DisabledLabel')
|
||||||
disabledLayout.addWidget(disabledLabel)
|
disabledLayout.addWidget(disabledLabel)
|
||||||
|
disabledLayout.addSpacerItem(self.stackSpacer)
|
||||||
layout.addWidget(disabledWidget)
|
layout.addWidget(disabledWidget)
|
||||||
importWidget = QtGui.QWidget(page)
|
importWidget = QtGui.QWidget(page)
|
||||||
importWidget.setObjectName(obj_prefix + u'ImportWidget')
|
importWidget.setObjectName(obj_prefix + u'ImportWidget')
|
||||||
|
Loading…
Reference in New Issue
Block a user