forked from openlp/openlp
More cleanups
This commit is contained in:
parent
0b4fd3c585
commit
79ed96648f
@ -35,20 +35,20 @@ class Ui_SettingsDialog(object):
|
||||
settingsDialog.resize(800, 500)
|
||||
settingsDialog.setWindowIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.settingsLayout = QtGui.QGridLayout(settingsDialog)
|
||||
self.settingsLayout.setObjectName(u'settingsLayout')
|
||||
self.settingsLayout.setMargin(0)
|
||||
self.dialogLayout = QtGui.QGridLayout(settingsDialog)
|
||||
self.dialogLayout.setObjectName(u'dialogLayout')
|
||||
self.dialogLayout.setMargin(0)
|
||||
self.settingListWidget = QtGui.QListWidget(settingsDialog)
|
||||
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.dialogLayout.addWidget(self.settingListWidget, 0, 0, 1, 1)
|
||||
self.stackedLayout = QtGui.QStackedLayout()
|
||||
self.stackedLayout.setObjectName(u'stackedLayout')
|
||||
self.settingsLayout.addLayout(self.stackedLayout, 0, 1, 1, 1)
|
||||
self.dialogLayout.addLayout(self.stackedLayout, 0, 1, 1, 1)
|
||||
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
|
||||
self.settingsLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
|
||||
self.dialogLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
|
||||
self.retranslateUi(settingsDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||
QtCore.QObject.connect(self.settingListWidget,
|
||||
|
@ -60,9 +60,9 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||
# load all the settings
|
||||
for tabIndex in range(0, self.stackedLayout.count()):
|
||||
self.stackedLayout.widget(tabIndex).load()
|
||||
self.settingListWidget.setCurrentRow(0)
|
||||
return QtGui.QDialog.exec_(self)
|
||||
|
||||
|
||||
def insertTab(self, tab, location):
|
||||
"""
|
||||
Add a tab to the form at a specific location
|
||||
@ -78,13 +78,11 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||
match = True
|
||||
break
|
||||
if not match:
|
||||
self.stackedLayout.addWidget(tab)
|
||||
pos = self.stackedLayout.addWidget(tab)
|
||||
item_name = QtGui.QListWidgetItem(tab.tabTitleVisible)
|
||||
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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user