Made the item editor dialog less cluttered
This commit is contained in:
@@ -34,7 +34,7 @@ from PyQt5.QtWidgets import (
|
|||||||
QDialogButtonBox
|
QDialogButtonBox
|
||||||
)
|
)
|
||||||
|
|
||||||
from nw.gui.additions import QSwitch, QHelpLabel
|
from nw.gui.additions import QSwitch
|
||||||
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
|
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -59,13 +59,6 @@ class GuiItemEditor(QDialog):
|
|||||||
self.setWindowTitle("Item Settings")
|
self.setWindowTitle("Item Settings")
|
||||||
self.setLayout(self.outerBox)
|
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
|
# Item Label
|
||||||
self.editName = QLineEdit()
|
self.editName = QLineEdit()
|
||||||
self.editName.setMinimumWidth(220)
|
self.editName.setMinimumWidth(220)
|
||||||
@@ -132,6 +125,7 @@ class GuiItemEditor(QDialog):
|
|||||||
# Assemble
|
# Assemble
|
||||||
self.mainForm = QGridLayout()
|
self.mainForm = QGridLayout()
|
||||||
self.mainForm.setVerticalSpacing(4)
|
self.mainForm.setVerticalSpacing(4)
|
||||||
|
self.mainForm.setHorizontalSpacing(16)
|
||||||
self.mainForm.addWidget(QLabel("Label"), 0, 0, 1, 1)
|
self.mainForm.addWidget(QLabel("Label"), 0, 0, 1, 1)
|
||||||
self.mainForm.addWidget(self.editName, 0, 1, 1, 2)
|
self.mainForm.addWidget(self.editName, 0, 1, 1, 2)
|
||||||
self.mainForm.addWidget(QLabel("Status"), 1, 0, 1, 1)
|
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.textExport, 3, 0, 1, 2)
|
||||||
self.mainForm.addWidget(self.editExport, 3, 2, 1, 1)
|
self.mainForm.addWidget(self.editExport, 3, 2, 1, 1)
|
||||||
|
|
||||||
self.outerBox.setSpacing(0)
|
self.outerBox.setSpacing(16)
|
||||||
self.outerBox.addWidget(self.headLabel)
|
|
||||||
self.outerBox.addWidget(self.helpLabel)
|
|
||||||
self.outerBox.addSpacing(8)
|
|
||||||
self.outerBox.addLayout(self.mainForm)
|
self.outerBox.addLayout(self.mainForm)
|
||||||
self.outerBox.addSpacing(12)
|
|
||||||
self.outerBox.addStretch(1)
|
self.outerBox.addStretch(1)
|
||||||
self.outerBox.addWidget(self.buttonBox)
|
self.outerBox.addWidget(self.buttonBox)
|
||||||
self.setLayout(self.outerBox)
|
self.setLayout(self.outerBox)
|
||||||
|
|
||||||
self.rejected.connect(self._doClose)
|
self.rejected.connect(self._doClose)
|
||||||
self.show()
|
|
||||||
|
|
||||||
self.editName.selectAll()
|
self.editName.selectAll()
|
||||||
|
|
||||||
logger.debug("GuiItemEditor initialisation complete")
|
logger.debug("GuiItemEditor initialisation complete")
|
||||||
|
|||||||
Reference in New Issue
Block a user