diff --git a/openlp/core/ui/aboutdialog.py b/openlp/core/ui/aboutdialog.py index 430ca406d..597d3fb24 100644 --- a/openlp/core/ui/aboutdialog.py +++ b/openlp/core/ui/aboutdialog.py @@ -31,17 +31,12 @@ from openlp.core.lib import build_icon, translate class Ui_AboutDialog(object): def setupUi(self, aboutDialog): aboutDialog.setObjectName(u'aboutDialog') - aboutDialog.resize(516, 481) aboutDialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png')) self.aboutDialogLayout = QtGui.QVBoxLayout(aboutDialog) - self.aboutDialogLayout.setSpacing(8) - self.aboutDialogLayout.setMargin(8) self.aboutDialogLayout.setObjectName(u'aboutDialogLayout') self.logoLabel = QtGui.QLabel(aboutDialog) self.logoLabel.setPixmap( QtGui.QPixmap(u':/graphics/openlp-about-logo.png')) - self.logoLabel.setScaledContents(False) - self.logoLabel.setIndent(0) self.logoLabel.setObjectName(u'logoLabel') self.aboutDialogLayout.addWidget(self.logoLabel) self.aboutNotebook = QtGui.QTabWidget(aboutDialog) @@ -49,59 +44,44 @@ class Ui_AboutDialog(object): self.aboutTab = QtGui.QWidget() self.aboutTab.setObjectName(u'aboutTab') self.aboutTabLayout = QtGui.QVBoxLayout(self.aboutTab) - self.aboutTabLayout.setSpacing(0) - self.aboutTabLayout.setMargin(8) self.aboutTabLayout.setObjectName(u'aboutTabLayout') self.aboutTextEdit = QtGui.QPlainTextEdit(self.aboutTab) self.aboutTextEdit.setReadOnly(True) self.aboutTextEdit.setObjectName(u'aboutTextEdit') self.aboutTabLayout.addWidget(self.aboutTextEdit) - self.aboutNotebook.addTab(self.aboutTab, '') + self.aboutNotebook.addTab(self.aboutTab, u'') self.creditsTab = QtGui.QWidget() self.creditsTab.setObjectName(u'creditsTab') self.creditsTabLayout = QtGui.QVBoxLayout(self.creditsTab) - self.creditsTabLayout.setSpacing(0) - self.creditsTabLayout.setMargin(8) self.creditsTabLayout.setObjectName(u'creditsTabLayout') self.creditsTextEdit = QtGui.QPlainTextEdit(self.creditsTab) self.creditsTextEdit.setReadOnly(True) self.creditsTextEdit.setObjectName(u'creditsTextEdit') self.creditsTabLayout.addWidget(self.creditsTextEdit) - self.aboutNotebook.addTab(self.creditsTab, '') + self.aboutNotebook.addTab(self.creditsTab, u'') self.licenseTab = QtGui.QWidget() self.licenseTab.setObjectName(u'licenseTab') self.licenseTabLayout = QtGui.QVBoxLayout(self.licenseTab) - self.licenseTabLayout.setSpacing(8) - self.licenseTabLayout.setMargin(8) self.licenseTabLayout.setObjectName(u'licenseTabLayout') self.licenseTextEdit = QtGui.QPlainTextEdit(self.licenseTab) self.licenseTextEdit.setReadOnly(True) self.licenseTextEdit.setObjectName(u'licenseTextEdit') self.licenseTabLayout.addWidget(self.licenseTextEdit) - self.aboutNotebook.addTab(self.licenseTab, '') + self.aboutNotebook.addTab(self.licenseTab, u'') self.aboutDialogLayout.addWidget(self.aboutNotebook) - self.buttonWidget = QtGui.QWidget(aboutDialog) - self.buttonWidget.setObjectName(u'buttonWidget') - self.buttonWidgetLayout = QtGui.QHBoxLayout(self.buttonWidget) - self.buttonWidgetLayout.setSpacing(8) - self.buttonWidgetLayout.setMargin(0) - self.buttonWidgetLayout.setObjectName(u'buttonWidgetLayout') - buttonSpacer = QtGui.QSpacerItem(275, 20, - QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.buttonWidgetLayout.addItem(buttonSpacer) - self.contributeButton = QtGui.QPushButton(self.buttonWidget) + self.buttonBox = QtGui.QDialogButtonBox(aboutDialog) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close) + self.buttonBox.setObjectName(u'buttonBox') + self.contributeButton = QtGui.QPushButton() self.contributeButton.setIcon( build_icon(u':/system/system_contribute.png')) self.contributeButton.setObjectName(u'contributeButton') - self.buttonWidgetLayout.addWidget(self.contributeButton) - self.closeButton = QtGui.QPushButton(self.buttonWidget) - self.closeButton.setIcon(build_icon(u':/system/system_close.png')) - self.closeButton.setObjectName(u'closeButton') - self.buttonWidgetLayout.addWidget(self.closeButton) - self.aboutDialogLayout.addWidget(self.buttonWidget) + self.buttonBox.addButton(self.contributeButton, + QtGui.QDialogButtonBox.ActionRole) + self.aboutDialogLayout.addWidget(self.buttonBox) self.retranslateUi(aboutDialog) self.aboutNotebook.setCurrentIndex(0) - QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(u'clicked()'), + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'), aboutDialog.close) QtCore.QMetaObject.connectSlotsByName(aboutDialog) @@ -575,4 +555,3 @@ class Ui_AboutDialog(object): translate('OpenLP.AboutForm', 'License')) self.contributeButton.setText(translate('OpenLP.AboutForm', 'Contribute')) - self.closeButton.setText(translate('OpenLP.AboutForm', 'Close')) \ No newline at end of file diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index 0a8547837..0e2a4e88d 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -46,92 +46,64 @@ class AdvancedTab(SettingsTab): Configure the UI elements for the tab. """ self.setObjectName(u'AdvancedTab') - self.tabTitleVisible = translate('OpenLP.AdvancedTab', 'Advanced') self.advancedTabLayout = QtGui.QHBoxLayout(self) - self.advancedTabLayout.setSpacing(8) - self.advancedTabLayout.setMargin(8) + self.advancedTabLayout.setSpacing(0) + self.advancedTabLayout.setObjectName(u'advancedTabLayout') self.leftWidget = QtGui.QWidget(self) + self.leftWidget.setObjectName(u'leftWidget') self.leftLayout = QtGui.QVBoxLayout(self.leftWidget) - self.leftLayout.setSpacing(8) - self.leftLayout.setMargin(0) + self.leftLayout.setObjectName(u'leftLayout') self.uiGroupBox = QtGui.QGroupBox(self.leftWidget) self.uiGroupBox.setObjectName(u'uiGroupBox') - self.uiLayout = QtGui.QVBoxLayout(self.uiGroupBox) - self.uiLayout.setSpacing(8) - self.uiLayout.setMargin(6) + self.uiLayout = QtGui.QFormLayout(self.uiGroupBox) self.uiLayout.setObjectName(u'uiLayout') - self.recentLayout = QtGui.QHBoxLayout() - self.recentLayout.setSpacing(8) - self.recentLayout.setMargin(0) - self.recentLayout.setObjectName(u'recentLayout') self.recentLabel = QtGui.QLabel(self.uiGroupBox) self.recentLabel.setObjectName(u'recentLabel') - self.recentLayout.addWidget(self.recentLabel) self.recentSpinBox = QtGui.QSpinBox(self.uiGroupBox) self.recentSpinBox.setObjectName(u'recentSpinBox') self.recentSpinBox.setMinimum(0) - self.recentLayout.addWidget(self.recentSpinBox) - self.recentSpacer = QtGui.QSpacerItem(50, 20, - QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.recentLayout.addItem(self.recentSpacer) - self.uiLayout.addLayout(self.recentLayout) + self.uiLayout.addRow(self.recentLabel, self.recentSpinBox) self.mediaPluginCheckBox = QtGui.QCheckBox(self.uiGroupBox) self.mediaPluginCheckBox.setObjectName(u'mediaPluginCheckBox') - self.uiLayout.addWidget(self.mediaPluginCheckBox) + self.uiLayout.addRow(self.mediaPluginCheckBox) self.doubleClickLiveCheckBox = QtGui.QCheckBox(self.uiGroupBox) self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox') - self.uiLayout.addWidget(self.doubleClickLiveCheckBox) -# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox) -# self.expandServiceItemCheckBox.setObjectName( -# u'expandServiceItemCheckBox') -# self.uiLayout.addWidget(self.expandServiceItemCheckBox) - self.leftLayout.addWidget(self.uiGroupBox) + self.uiLayout.addRow(self.doubleClickLiveCheckBox) self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox) self.expandServiceItemCheckBox.setObjectName( u'expandServiceItemCheckBox') - self.uiLayout.addWidget(self.expandServiceItemCheckBox) + self.uiLayout.addRow(self.expandServiceItemCheckBox) + self.leftLayout.addWidget(self.uiGroupBox) # self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget) # self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox') -# self.sharedDirGroupBox.setGeometry(QtCore.QRect(0, 65, 500, 85)) -# self.sharedDirGroupBox.setMaximumSize(QtCore.QSize(500, 85)) -# self.sharedDirLayout = QtGui.QVBoxLayout(self.sharedDirGroupBox) -# self.sharedDirLayout.setSpacing(8) -# self.sharedDirLayout.setMargin(8) +# self.sharedDirLayout = QtGui.QFormLayout(self.sharedDirGroupBox) # self.sharedCheckBox = QtGui.QCheckBox(self.sharedDirGroupBox) # self.sharedCheckBox.setObjectName(u'sharedCheckBox') -# self.sharedDirLayout.addWidget(self.sharedCheckBox) -# self.sharedSubLayout = QtGui.QHBoxLayout() -# self.sharedSubLayout.setSpacing(8) -# self.sharedSubLayout.setMargin(0) +# self.sharedDirLayout.addRow(self.sharedCheckBox) # self.sharedLabel = QtGui.QLabel(self.sharedDirGroupBox) # self.sharedLabel.setObjectName(u'sharedLabel') -# self.sharedSubLayout.addWidget(self.sharedLabel) +# self.sharedSubLayout = QtGui.QHBoxLayout() +# self.sharedSubLayout.setObjectName(u'sharedSubLayout') # self.sharedLineEdit = QtGui.QLineEdit(self.sharedDirGroupBox) # self.sharedLineEdit.setObjectName(u'sharedLineEdit') # self.sharedSubLayout.addWidget(self.sharedLineEdit) # self.sharedPushButton = QtGui.QPushButton(self.sharedDirGroupBox) # self.sharedPushButton.setObjectName(u'sharedPushButton') # self.sharedSubLayout.addWidget(self.sharedPushButton) -# self.sharedDirLayout.addLayout(self.sharedSubLayout) +# self.sharedDirLayout.addRow(self.sharedLabel, self.sharedSubLayout) # self.leftLayout.addWidget(self.sharedDirGroupBox) - self.leftSpacer = QtGui.QSpacerItem(20, 40, - QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.leftLayout.addItem(self.leftSpacer) + self.leftLayout.addStretch() self.advancedTabLayout.addWidget(self.leftWidget) self.rightWidget = QtGui.QWidget(self) + self.rightWidget.setObjectName(u'rightWidget') self.rightLayout = QtGui.QVBoxLayout(self.rightWidget) - self.rightLayout.setSpacing(8) - self.rightLayout.setMargin(0) + self.rightLayout.setObjectName(u'rightLayout') # self.databaseGroupBox = QtGui.QGroupBox(self.rightWidget) # self.databaseGroupBox.setObjectName(u'databaseGroupBox') # self.databaseGroupBox.setEnabled(False) # self.databaseLayout = QtGui.QVBoxLayout(self.databaseGroupBox) -# self.databaseLayout.setSpacing(8) -# self.databaseLayout.setMargin(8) # self.rightLayout.addWidget(self.databaseGroupBox) - self.rightSpacer = QtGui.QSpacerItem(20, 40, - QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) - self.rightLayout.addItem(self.rightSpacer) + self.rightLayout.addStretch() self.advancedTabLayout.addWidget(self.rightWidget) # QtCore.QObject.connect(self.sharedCheckBox, # QtCore.SIGNAL(u'stateChanged(int)'), self.onSharedCheckBoxChanged) @@ -140,6 +112,7 @@ class AdvancedTab(SettingsTab): """ Setup the interface translation strings. """ + self.tabTitleVisible = translate('OpenLP.AdvancedTab', 'Advanced') self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings')) self.recentLabel.setText( translate('OpenLP.AdvancedTab', @@ -158,6 +131,16 @@ class AdvancedTab(SettingsTab): # self.sharedPushButton.setText(translate('AdvancedTab', 'Browse...')) # self.databaseGroupBox.setTitle(translate('AdvancedTab', 'Databases')) + def resizeEvent(self, event=None): + """ + Rescale the theme preview thumbnail on resize events. + """ + if event: + SettingsTab.resizeEvent(self, event) + self.leftWidget.setMinimumWidth(max( + self.width() / 2 - self.advancedTabLayout.contentsMargins().left(), + self.leftWidget.minimumSizeHint().width())) + def load(self): """ Load settings from disk. @@ -204,4 +187,4 @@ class AdvancedTab(SettingsTab): """ self.sharedLabel.setEnabled(checked) self.sharedTextEdit.setEnabled(checked) - self.sharedPushButton.setEnabled(checked) \ No newline at end of file + self.sharedPushButton.setEnabled(checked) diff --git a/openlp/core/ui/exceptiondialog.py b/openlp/core/ui/exceptiondialog.py index eaed502b3..69035dc4d 100644 --- a/openlp/core/ui/exceptiondialog.py +++ b/openlp/core/ui/exceptiondialog.py @@ -31,23 +31,16 @@ from openlp.core.lib import translate, build_icon class Ui_ExceptionDialog(object): def setupUi(self, exceptionDialog): exceptionDialog.setObjectName(u'exceptionDialog') - exceptionDialog.resize(580, 407) self.exceptionLayout = QtGui.QVBoxLayout(exceptionDialog) - self.exceptionLayout.setSpacing(8) - self.exceptionLayout.setMargin(8) self.exceptionLayout.setObjectName(u'exceptionLayout') self.messageLayout = QtGui.QHBoxLayout() - self.messageLayout.setSpacing(0) - self.messageLayout.setContentsMargins(0, -1, 0, -1) self.messageLayout.setObjectName(u'messageLayout') + self.messageLayout.addSpacing(12) self.bugLabel = QtGui.QLabel(exceptionDialog) - self.bugLabel.setMinimumSize(QtCore.QSize(64, 64)) - self.bugLabel.setMaximumSize(QtCore.QSize(64, 64)) - self.bugLabel.setText(u'') self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png')) - self.bugLabel.setAlignment(QtCore.Qt.AlignCenter) self.bugLabel.setObjectName(u'bugLabel') self.messageLayout.addWidget(self.bugLabel) + self.messageLayout.addSpacing(12) self.messageLabel = QtGui.QLabel(exceptionDialog) self.messageLabel.setWordWrap(True) self.messageLabel.setObjectName(u'messageLabel') @@ -55,11 +48,9 @@ class Ui_ExceptionDialog(object): self.exceptionLayout.addLayout(self.messageLayout) self.exceptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog) self.exceptionTextEdit.setReadOnly(True) - self.exceptionTextEdit.setBackgroundVisible(False) self.exceptionTextEdit.setObjectName(u'exceptionTextEdit') self.exceptionLayout.addWidget(self.exceptionTextEdit) self.exceptionButtonBox = QtGui.QDialogButtonBox(exceptionDialog) - self.exceptionButtonBox.setOrientation(QtCore.Qt.Horizontal) self.exceptionButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close) self.exceptionButtonBox.setObjectName(u'exceptionButtonBox') self.exceptionLayout.addWidget(self.exceptionButtonBox) @@ -76,8 +67,6 @@ class Ui_ExceptionDialog(object): QtGui.QDialogButtonBox.ActionRole) self.retranslateUi(exceptionDialog) - QtCore.QObject.connect(self.exceptionButtonBox, - QtCore.SIGNAL(u'accepted()'), exceptionDialog.accept) QtCore.QObject.connect(self.exceptionButtonBox, QtCore.SIGNAL(u'rejected()'), exceptionDialog.reject) QtCore.QObject.connect(self.sendReportButton, @@ -98,4 +87,4 @@ class Ui_ExceptionDialog(object): self.sendReportButton.setText(translate('OpenLP.ExceptionDialog', 'Send E-Mail')) self.saveReportButton.setText(translate('OpenLP.ExceptionDialog', - 'Save to File')) \ No newline at end of file + 'Save to File')) diff --git a/openlp/core/ui/filerenamedialog.py b/openlp/core/ui/filerenamedialog.py index 47d301dd9..f5190aa16 100644 --- a/openlp/core/ui/filerenamedialog.py +++ b/openlp/core/ui/filerenamedialog.py @@ -31,27 +31,25 @@ from openlp.core.lib import translate class Ui_FileRenameDialog(object): def setupUi(self, FileRenameDialog): FileRenameDialog.setObjectName(u'FileRenameDialog') - FileRenameDialog.resize(400, 87) + self.dialogLayout = QtGui.QGridLayout(FileRenameDialog) + self.dialogLayout.setObjectName(u'dialogLayout') + self.fileNameLabel = QtGui.QLabel(FileRenameDialog) + self.fileNameLabel.setObjectName(u'fileNameLabel') + self.dialogLayout.addWidget(self.fileNameLabel, 0, 0) + self.fileNameEdit = QtGui.QLineEdit(FileRenameDialog) + self.fileNameEdit.resize(self.fileNameEdit.sizeHint().width() * 2, + self.fileNameEdit.sizeHint().height()) + self.fileNameEdit.setObjectName(u'fileNameEdit') + self.dialogLayout.addWidget(self.fileNameEdit, 0, 1) self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog) - self.buttonBox.setGeometry(QtCore.QRect(210, 50, 171, 25)) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(u'buttonBox') - self.widget = QtGui.QWidget(FileRenameDialog) - self.widget.setGeometry(QtCore.QRect(10, 10, 381, 35)) - self.widget.setObjectName(u'widget') - self.horizontalLayout = QtGui.QHBoxLayout(self.widget) - self.horizontalLayout.setObjectName(u'horizontalLayout') - self.fileRenameLabel = QtGui.QLabel(self.widget) - self.fileRenameLabel.setObjectName(u'fileRenameLabel') - self.horizontalLayout.addWidget(self.fileRenameLabel) - self.fileNameEdit = QtGui.QLineEdit(self.widget) - self.fileNameEdit.setObjectName(u'fileNameEdit') - self.horizontalLayout.addWidget(self.fileNameEdit) - + self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2) self.retranslateUi(FileRenameDialog) + self.setMaximumHeight(self.sizeHint().height()) QtCore.QMetaObject.connectSlotsByName(FileRenameDialog) def retranslateUi(self, FileRenameDialog): - self.fileRenameLabel.setText(translate('OpenLP.FileRenameForm', - 'New File Name:')) \ No newline at end of file + self.fileNameLabel.setText(translate('OpenLP.FileRenameForm', + 'New File Name:')) diff --git a/openlp/core/ui/filerenameform.py b/openlp/core/ui/filerenameform.py index 9ff310030..86634e3b1 100644 --- a/openlp/core/ui/filerenameform.py +++ b/openlp/core/ui/filerenameform.py @@ -52,4 +52,4 @@ class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog): else: self.setWindowTitle(translate('OpenLP.FileRenameForm', 'File Rename')) - return QtGui.QDialog.exec_(self) \ No newline at end of file + return QtGui.QDialog.exec_(self) diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 1dd6607ed..6a54d9636 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -87,35 +87,29 @@ class GeneralTab(SettingsTab): self.setObjectName(u'GeneralTab') self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General') self.generalLayout = QtGui.QHBoxLayout(self) - self.generalLayout.setSpacing(8) - self.generalLayout.setMargin(8) + self.generalLayout.setSpacing(0) self.generalLayout.setObjectName(u'generalLayout') - self.generalLeftLayout = QtGui.QVBoxLayout() - self.generalLeftLayout.setObjectName(u'generalLeftLayout') - self.generalLeftLayout.setSpacing(8) - self.generalLeftLayout.setMargin(0) - self.generalLayout.addLayout(self.generalLeftLayout) - self.monitorGroupBox = QtGui.QGroupBox(self) + self.leftWidget = QtGui.QWidget(self) + self.leftWidget.setObjectName(u'leftWidget') + self.leftLayout = QtGui.QVBoxLayout(self.leftWidget) + self.leftLayout.setObjectName(u'leftLayout') + self.monitorGroupBox = QtGui.QGroupBox(self.leftWidget) self.monitorGroupBox.setObjectName(u'monitorGroupBox') - self.monitorLayout = QtGui.QVBoxLayout(self.monitorGroupBox) - self.monitorLayout.setSpacing(8) - self.monitorLayout.setMargin(8) + self.monitorLayout = QtGui.QFormLayout(self.monitorGroupBox) self.monitorLayout.setObjectName(u'monitorLayout') self.monitorLabel = QtGui.QLabel(self.monitorGroupBox) self.monitorLabel.setObjectName(u'monitorLabel') - self.monitorLayout.addWidget(self.monitorLabel) + self.monitorLayout.addRow(self.monitorLabel) self.monitorComboBox = QtGui.QComboBox(self.monitorGroupBox) self.monitorComboBox.setObjectName(u'monitorComboBox') - self.monitorLayout.addWidget(self.monitorComboBox) + self.monitorLayout.addRow(self.monitorComboBox) self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox) self.displayOnMonitorCheck.setObjectName(u'monitorComboBox') - self.monitorLayout.addWidget(self.displayOnMonitorCheck) - self.generalLeftLayout.addWidget(self.monitorGroupBox) - self.startupGroupBox = QtGui.QGroupBox(self) + self.monitorLayout.addRow(self.displayOnMonitorCheck) + self.leftLayout.addWidget(self.monitorGroupBox) + self.startupGroupBox = QtGui.QGroupBox(self.leftWidget) self.startupGroupBox.setObjectName(u'startupGroupBox') self.startupLayout = QtGui.QVBoxLayout(self.startupGroupBox) - self.startupLayout.setSpacing(8) - self.startupLayout.setMargin(8) self.startupLayout.setObjectName(u'startupLayout') self.warningCheckBox = QtGui.QCheckBox(self.startupGroupBox) self.warningCheckBox.setObjectName(u'warningCheckBox') @@ -126,189 +120,112 @@ class GeneralTab(SettingsTab): self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox) self.showSplashCheckBox.setObjectName(u'showSplashCheckBox') self.startupLayout.addWidget(self.showSplashCheckBox) - self.generalLeftLayout.addWidget(self.startupGroupBox) - self.settingsGroupBox = QtGui.QGroupBox(self) + self.leftLayout.addWidget(self.startupGroupBox) + self.settingsGroupBox = QtGui.QGroupBox(self.leftWidget) self.settingsGroupBox.setObjectName(u'settingsGroupBox') - self.settingsLayout = QtGui.QGridLayout(self.settingsGroupBox) - self.settingsLayout.setSpacing(8) - self.settingsLayout.setMargin(8) + self.settingsLayout = QtGui.QFormLayout(self.settingsGroupBox) self.settingsLayout.setObjectName(u'settingsLayout') self.saveCheckServiceCheckBox = QtGui.QCheckBox(self.settingsGroupBox) self.saveCheckServiceCheckBox.setObjectName(u'saveCheckServiceCheckBox') - self.settingsLayout.addWidget(self.saveCheckServiceCheckBox, 0, 0, 1, 2) + self.settingsLayout.addRow(self.saveCheckServiceCheckBox) self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox) self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox') - self.settingsLayout.addWidget(self.autoPreviewCheckBox, 1, 0, 1, 2) + self.settingsLayout.addRow(self.autoPreviewCheckBox) # Moved here from image tab self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox) self.timeoutLabel.setObjectName(u'timeoutLabel') - self.settingsLayout.addWidget(self.timeoutLabel, 2, 0, 1, 1) self.timeoutSpinBox = QtGui.QSpinBox(self.settingsGroupBox) self.timeoutSpinBox.setObjectName(u'timeoutSpinBox') - self.settingsLayout.addWidget(self.timeoutSpinBox, 2, 1, 1, 1) - self.generalLeftLayout.addWidget(self.settingsGroupBox) - self.generalLeftSpacer = QtGui.QSpacerItem(20, 40, - QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.generalLeftLayout.addItem(self.generalLeftSpacer) - self.generalRightLayout = QtGui.QVBoxLayout() - self.generalRightLayout.setSpacing(8) - self.generalRightLayout.setMargin(0) - self.generalRightLayout.setObjectName(u'generalRightLayout') - self.generalLayout.addLayout(self.generalRightLayout) - self.ccliGroupBox = QtGui.QGroupBox(self) + self.settingsLayout.addRow(self.timeoutLabel, self.timeoutSpinBox) + self.leftLayout.addWidget(self.settingsGroupBox) + self.leftLayout.addStretch() + self.generalLayout.addWidget(self.leftWidget) + self.rightWidget = QtGui.QWidget(self) + self.rightWidget.setObjectName(u'rightWidget') + self.rightLayout = QtGui.QVBoxLayout(self.rightWidget) + self.rightLayout.setObjectName(u'rightLayout') + self.ccliGroupBox = QtGui.QGroupBox(self.rightWidget) self.ccliGroupBox.setObjectName(u'ccliGroupBox') - self.ccliLayout = QtGui.QGridLayout(self.ccliGroupBox) - self.ccliLayout.setMargin(8) - self.ccliLayout.setSpacing(8) + self.ccliLayout = QtGui.QFormLayout(self.ccliGroupBox) self.ccliLayout.setObjectName(u'ccliLayout') self.numberLabel = QtGui.QLabel(self.ccliGroupBox) self.numberLabel.setObjectName(u'numberLabel') - self.ccliLayout.addWidget(self.numberLabel, 0, 0, 1, 1) self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox) self.numberEdit.setObjectName(u'numberEdit') - self.ccliLayout.addWidget(self.numberEdit, 0, 1, 1, 1) + self.ccliLayout.addRow(self.numberLabel, self.numberEdit) self.usernameLabel = QtGui.QLabel(self.ccliGroupBox) self.usernameLabel.setObjectName(u'usernameLabel') - self.ccliLayout.addWidget(self.usernameLabel, 1, 0, 1, 1) self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox) self.usernameEdit.setObjectName(u'usernameEdit') - self.ccliLayout.addWidget(self.usernameEdit, 1, 1, 1, 1) + self.ccliLayout.addRow(self.usernameLabel, self.usernameEdit) self.passwordLabel = QtGui.QLabel(self.ccliGroupBox) self.passwordLabel.setObjectName(u'passwordLabel') - self.ccliLayout.addWidget(self.passwordLabel, 2, 0, 1, 1) self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox) self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password) self.passwordEdit.setObjectName(u'passwordEdit') - self.ccliLayout.addWidget(self.passwordEdit, 2, 1, 1, 1) - self.generalRightLayout.addWidget(self.ccliGroupBox) + self.ccliLayout.addRow(self.passwordLabel, self.passwordEdit) + self.rightLayout.addWidget(self.ccliGroupBox) # Moved here from display tab - self.displayGroupBox = QtGui.QGroupBox(self) + self.displayGroupBox = QtGui.QGroupBox(self.rightWidget) self.displayGroupBox.setObjectName(u'displayGroupBox') - self.displayLayout = QtGui.QVBoxLayout(self.displayGroupBox) - self.displayLayout.setSpacing(8) - self.displayLayout.setMargin(8) + self.displayLayout = QtGui.QGridLayout(self.displayGroupBox) self.displayLayout.setObjectName(u'displayLayout') - self.currentLayout = QtGui.QHBoxLayout() - self.currentLayout.setSpacing(8) - self.currentLayout.setMargin(0) - self.currentLayout.setObjectName(u'currentLayout') - self.currentXLayout = QtGui.QVBoxLayout() - self.currentXLayout.setSpacing(0) - self.currentXLayout.setMargin(0) - self.currentXLayout.setObjectName(u'currentXLayout') self.currentXLabel = QtGui.QLabel(self.displayGroupBox) - self.currentXLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentXLabel.setObjectName(u'currentXLabel') - self.currentXLayout.addWidget(self.currentXLabel) + self.displayLayout.addWidget(self.currentXLabel, 0, 0) self.currentXValueLabel = QtGui.QLabel(self.displayGroupBox) - self.currentXValueLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentXValueLabel.setObjectName(u'currentXValueLabel') - self.currentXLayout.addWidget(self.currentXValueLabel) - self.currentLayout.addLayout(self.currentXLayout) - self.currentYLayout = QtGui.QVBoxLayout() - self.currentYLayout.setSpacing(0) - self.currentYLayout.setMargin(0) - self.currentYLayout.setObjectName(u'currentYLayout') + self.displayLayout.addWidget(self.currentXValueLabel, 1, 0) self.currentYLabel = QtGui.QLabel(self.displayGroupBox) - self.currentYLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentYLabel.setObjectName(u'currentYLabel') - self.currentYLayout.addWidget(self.currentYLabel) + self.displayLayout.addWidget(self.currentYLabel, 0, 1) self.currentYValueLabel = QtGui.QLabel(self.displayGroupBox) - self.currentYValueLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentYValueLabel.setObjectName(u'currentYValueLabel') - self.currentYLayout.addWidget(self.currentYValueLabel) - self.currentLayout.addLayout(self.currentYLayout) - self.currentWidthLayout = QtGui.QVBoxLayout() - self.currentWidthLayout.setSpacing(0) - self.currentWidthLayout.setMargin(0) - self.currentWidthLayout.setObjectName(u'currentWidthLayout') + self.displayLayout.addWidget(self.currentYValueLabel, 1, 1) self.currentWidthLabel = QtGui.QLabel(self.displayGroupBox) - self.currentWidthLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentWidthLabel.setObjectName(u'currentWidthLabel') - self.currentWidthLayout.addWidget(self.currentWidthLabel) + self.displayLayout.addWidget(self.currentWidthLabel, 0, 2) self.currentWidthValueLabel = QtGui.QLabel(self.displayGroupBox) - self.currentWidthValueLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentWidthValueLabel.setObjectName(u'currentWidthValueLabel') - self.currentWidthLayout.addWidget(self.currentWidthValueLabel) - self.currentLayout.addLayout(self.currentWidthLayout) - self.currentHeightLayout = QtGui.QVBoxLayout() - self.currentHeightLayout.setSpacing(0) - self.currentHeightLayout.setMargin(0) - self.currentHeightLayout.setObjectName(u'currentHeightLayout') + self.displayLayout.addWidget(self.currentWidthValueLabel, 1, 2) self.currentHeightLabel = QtGui.QLabel(self.displayGroupBox) - self.currentHeightLabel.setMaximumSize(QtCore.QSize(100, 16777215)) - self.currentHeightLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentHeightLabel.setObjectName(u'currentHeightLabel') - self.currentHeightLayout.addWidget(self.currentHeightLabel) + self.displayLayout.addWidget(self.currentHeightLabel, 0, 3) self.currentHeightValueLabel = QtGui.QLabel(self.displayGroupBox) - self.currentHeightValueLabel.setAlignment(QtCore.Qt.AlignCenter) self.currentHeightValueLabel.setObjectName(u'Height') - self.currentHeightLayout.addWidget(self.currentHeightValueLabel) - self.currentLayout.addLayout(self.currentHeightLayout) - self.displayLayout.addLayout(self.currentLayout) + self.displayLayout.addWidget(self.currentHeightValueLabel, 1, 3) self.overrideCheckBox = QtGui.QCheckBox(self.displayGroupBox) self.overrideCheckBox.setObjectName(u'overrideCheckBox') - self.displayLayout.addWidget(self.overrideCheckBox) - self.generalRightLayout.addWidget(self.displayGroupBox) + self.displayLayout.addWidget(self.overrideCheckBox, 2, 0, 1, 4) + self.rightLayout.addWidget(self.displayGroupBox) # Custom position - self.customLayout = QtGui.QHBoxLayout() - self.customLayout.setSpacing(8) - self.customLayout.setMargin(0) - self.customLayout.setObjectName(u'customLayout') - self.customXLayout = QtGui.QVBoxLayout() - self.customXLayout.setSpacing(0) - self.customXLayout.setMargin(0) - self.customXLayout.setObjectName(u'customXLayout') self.customXLabel = QtGui.QLabel(self.displayGroupBox) - self.customXLabel.setAlignment(QtCore.Qt.AlignCenter) self.customXLabel.setObjectName(u'customXLabel') - self.customXLayout.addWidget(self.customXLabel) + self.displayLayout.addWidget(self.customXLabel, 3, 0) self.customXValueEdit = ValidEdit(self.displayGroupBox) self.customXValueEdit.setObjectName(u'customXValueEdit') - self.customXLayout.addWidget(self.customXValueEdit) - self.customLayout.addLayout(self.customXLayout) - self.customYLayout = QtGui.QVBoxLayout() - self.customYLayout.setSpacing(0) - self.customYLayout.setMargin(0) - self.customYLayout.setObjectName(u'customYLayout') + self.displayLayout.addWidget(self.customXValueEdit, 4, 0) self.customYLabel = QtGui.QLabel(self.displayGroupBox) - self.customYLabel.setAlignment(QtCore.Qt.AlignCenter) self.customYLabel.setObjectName(u'customYLabel') - self.customYLayout.addWidget(self.customYLabel) + self.displayLayout.addWidget(self.customYLabel, 3, 1) self.customYValueEdit = ValidEdit(self.displayGroupBox) self.customYValueEdit.setObjectName(u'customYValueEdit') - self.customYLayout.addWidget(self.customYValueEdit) - self.customLayout.addLayout(self.customYLayout) - self.customWidthLayout = QtGui.QVBoxLayout() - self.customWidthLayout.setSpacing(0) - self.customWidthLayout.setMargin(0) - self.customWidthLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize) - self.customWidthLayout.setObjectName(u'customWidthLayout') + self.displayLayout.addWidget(self.customYValueEdit, 4, 1) self.customWidthLabel = QtGui.QLabel(self.displayGroupBox) - self.customWidthLabel.setAlignment(QtCore.Qt.AlignCenter) self.customWidthLabel.setObjectName(u'customWidthLabel') - self.customWidthLayout.addWidget(self.customWidthLabel) + self.displayLayout.addWidget(self.customWidthLabel, 3, 2) self.customWidthValueEdit = ValidEdit(self.displayGroupBox) self.customWidthValueEdit.setObjectName(u'customWidthValueEdit') - self.customWidthLayout.addWidget(self.customWidthValueEdit) - self.customLayout.addLayout(self.customWidthLayout) - self.customHeightLayout = QtGui.QVBoxLayout() - self.customHeightLayout.setSpacing(0) - self.customHeightLayout.setMargin(0) - self.customHeightLayout.setObjectName(u'customHeightLayout') + self.displayLayout.addWidget(self.customWidthValueEdit, 4, 2) self.customHeightLabel = QtGui.QLabel(self.displayGroupBox) - self.customHeightLabel.setAlignment(QtCore.Qt.AlignCenter) self.customHeightLabel.setObjectName(u'customHeightLabel') - self.customHeightLayout.addWidget(self.customHeightLabel) + self.displayLayout.addWidget(self.customHeightLabel, 3, 3) self.customHeightValueEdit = ValidEdit(self.displayGroupBox) self.customHeightValueEdit.setObjectName(u'customHeightValueEdit') - self.customHeightLayout.addWidget(self.customHeightValueEdit) - self.customLayout.addLayout(self.customHeightLayout) - self.displayLayout.addLayout(self.customLayout) - # Bottom spacer - self.generalRightSpacer = QtGui.QSpacerItem(20, 40, - QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.generalRightLayout.addItem(self.generalRightSpacer) + self.displayLayout.addWidget(self.customHeightValueEdit, 4, 3) + self.rightLayout.addWidget(self.displayGroupBox) + self.rightLayout.addStretch() + self.generalLayout.addWidget(self.rightWidget) # Signals and slots QtCore.QObject.connect(self.overrideCheckBox, QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled) @@ -382,6 +299,16 @@ class GeneralTab(SettingsTab): translate('OpenLP.GeneralTab', 'Height')) self.customWidthLabel.setText(translate('OpenLP.GeneralTab', 'Width')) + def resizeEvent(self, event=None): + """ + Rescale the theme preview thumbnail on resize events. + """ + if event: + SettingsTab.resizeEvent(self, event) + self.leftWidget.setMinimumWidth(max( + self.width() / 2 - self.generalLayout.contentsMargins().left(), + self.leftWidget.minimumSizeHint().width())) + def load(self): """ Load the settings to populate the form