From 6474c99a85cffb7b13692561a335fd35600eebe1 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 13 Apr 2011 05:55:00 +0100 Subject: [PATCH] Settings Layout Ok ish --- openlp/core/ui/settingsdialog.py | 6 ++++-- openlp/core/ui/settingsform.py | 3 ++- resources/forms/settings.ui | 37 ++++++++++++++++++++++++++------ 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py index e66defac3..45a68c321 100644 --- a/openlp/core/ui/settingsdialog.py +++ b/openlp/core/ui/settingsdialog.py @@ -37,8 +37,11 @@ class Ui_SettingsDialog(object): build_icon(u':/system/system_settings.png')) self.settingsLayout = QtGui.QGridLayout(settingsDialog) self.settingsLayout.setObjectName(u'settingsLayout') + self.settingsLayout.setMargin(0) self.settingListWidget = QtGui.QListWidget(settingsDialog) - self.settingListWidget.setIconSize(QtCore.QSize(32, 32)) + self.settingListWidget.setMinimumSize(QtCore.QSize(150, 0)) + self.settingListWidget.setHorizontalScrollBarPolicy( + QtCore.Qt.ScrollBarAlwaysOff) self.settingListWidget.setObjectName(u'settingListWidget') self.settingsLayout.addWidget(self.settingListWidget, 0, 0, 1, 1) self.stackedLayout = QtGui.QStackedLayout() @@ -47,7 +50,6 @@ class Ui_SettingsDialog(object): self.buttonBox = create_accept_reject_button_box(settingsDialog, True) self.settingsLayout.addWidget(self.buttonBox, 1, 1, 1, 1) self.retranslateUi(settingsDialog) - self.stackedLayout.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(settingsDialog) QtCore.QObject.connect(self.settingListWidget, QtCore.SIGNAL(u'currentRowChanged(int)'), diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py index 6de2a14d8..1e71bc985 100644 --- a/openlp/core/ui/settingsform.py +++ b/openlp/core/ui/settingsform.py @@ -74,7 +74,6 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): if self.stackedLayout.widget(tabIndex): if self.stackedLayout.widget(tabIndex).tabTitleVisible == \ tab.tabTitleVisible: - print tab.tabTitleVisible self.stackedLayout.widget(tabIndex).setHidden(False) match = True break @@ -84,6 +83,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): icon = build_icon(tab.icon_path) item_name.setIcon(icon) self.settingListWidget.insertItem(14 + location, item_name) + self.stackedLayout.addWidget(tab) + self.stackedLayout.setCurrentIndex(0) def removeTab(self, tab): """ diff --git a/resources/forms/settings.ui b/resources/forms/settings.ui index 0c378e125..06e55a00d 100644 --- a/resources/forms/settings.ui +++ b/resources/forms/settings.ui @@ -17,26 +17,49 @@ :/icon/openlp.org-icon-32.bmp:/icon/openlp.org-icon-32.bmp - + 10 30 - 681 + 691 441 - - - - + + + 500 + 0 + + + + + + + 0 + 0 + 211 + 409 + + + + + 200 + 0 + + + + Qt::ScrollBarAlwaysOff + + + - +