Made the item editor dialog less cluttered

This commit is contained in:
Veronica K. B. Olsen
2020-05-21 20:13:50 +02:00
parent 7f3e9c0f31
commit 8aacad8ce0
+3 -15
View File
@@ -34,7 +34,7 @@ from PyQt5.QtWidgets import (
QDialogButtonBox
)
from nw.gui.additions import QSwitch, QHelpLabel
from nw.gui.additions import QSwitch
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
logger = logging.getLogger(__name__)
@@ -59,13 +59,6 @@ class GuiItemEditor(QDialog):
self.setWindowTitle("Item Settings")
self.setLayout(self.outerBox)
# Labels
self.headLabel = QLabel("<b>Edit Item Settings</b>")
self.helpLabel = QHelpLabel(
"Item layout and status options depend on the root folder.",
self.theParent.theTheme.helpText
)
# Item Label
self.editName = QLineEdit()
self.editName.setMinimumWidth(220)
@@ -132,6 +125,7 @@ class GuiItemEditor(QDialog):
# Assemble
self.mainForm = QGridLayout()
self.mainForm.setVerticalSpacing(4)
self.mainForm.setHorizontalSpacing(16)
self.mainForm.addWidget(QLabel("Label"), 0, 0, 1, 1)
self.mainForm.addWidget(self.editName, 0, 1, 1, 2)
self.mainForm.addWidget(QLabel("Status"), 1, 0, 1, 1)
@@ -141,19 +135,13 @@ class GuiItemEditor(QDialog):
self.mainForm.addWidget(self.textExport, 3, 0, 1, 2)
self.mainForm.addWidget(self.editExport, 3, 2, 1, 1)
self.outerBox.setSpacing(0)
self.outerBox.addWidget(self.headLabel)
self.outerBox.addWidget(self.helpLabel)
self.outerBox.addSpacing(8)
self.outerBox.setSpacing(16)
self.outerBox.addLayout(self.mainForm)
self.outerBox.addSpacing(12)
self.outerBox.addStretch(1)
self.outerBox.addWidget(self.buttonBox)
self.setLayout(self.outerBox)
self.rejected.connect(self._doClose)
self.show()
self.editName.selectAll()
logger.debug("GuiItemEditor initialisation complete")