Fix minor issues
This commit is contained in:
@@ -88,7 +88,7 @@ class GuiDocMerge(NDialog):
|
||||
self.buttonBox.rejected.connect(self.reject)
|
||||
|
||||
self.resetButton = self.buttonBox.addButton(QtDialogReset)
|
||||
if self.resetButton is not None:
|
||||
if self.resetButton:
|
||||
self.resetButton.clicked.connect(self._resetList)
|
||||
|
||||
# Assemble
|
||||
|
||||
@@ -210,16 +210,14 @@ class GuiProjectSettings(NDialog):
|
||||
|
||||
def _saveSettings(self) -> None:
|
||||
"""Save GUI settings."""
|
||||
winWidth = self.width()
|
||||
winHeight = self.height()
|
||||
statusColW = self.statusPage.columnWidth()
|
||||
importColW = self.importPage.columnWidth()
|
||||
replaceColW = self.replacePage.columnWidth()
|
||||
|
||||
logger.debug("Saving State: GuiProjectSettings")
|
||||
options = SHARED.project.options
|
||||
options.setValue("GuiProjectSettings", "winWidth", winWidth)
|
||||
options.setValue("GuiProjectSettings", "winHeight", winHeight)
|
||||
options.setValue("GuiProjectSettings", "winWidth", self.width())
|
||||
options.setValue("GuiProjectSettings", "winHeight", self.height())
|
||||
options.setValue("GuiProjectSettings", "statusColW", statusColW)
|
||||
options.setValue("GuiProjectSettings", "importColW", importColW)
|
||||
options.setValue("GuiProjectSettings", "replaceColW", replaceColW)
|
||||
@@ -391,7 +389,7 @@ class _StatusPage(NFixedPage):
|
||||
self.labelText.textEdited.connect(self._onNameEdit)
|
||||
|
||||
buttonStyle = (
|
||||
f"QToolButton {{padding: 0 {4}px;}} "
|
||||
"QToolButton {padding: 0 4px;} "
|
||||
"QToolButton::menu-indicator {image: none;}"
|
||||
)
|
||||
|
||||
|
||||
@@ -1228,10 +1228,10 @@ class _TreeContextMenu(QMenu):
|
||||
if len(self._indices) > 1:
|
||||
mSub = qtAddMenu(self, self.tr("Set Active to ..."))
|
||||
aOne = qtAddAction(mSub, self._tree.trActive)
|
||||
aOne.setIcon(SHARED.theme.getIcon("checked"))
|
||||
aOne.setIcon(SHARED.theme.getIcon("checked", "green"))
|
||||
aOne.triggered.connect(qtLambda(self._iterItemActive, True))
|
||||
aTwo = qtAddAction(mSub, self._tree.trInactive)
|
||||
aTwo.setIcon(SHARED.theme.getIcon("unchecked"))
|
||||
aTwo.setIcon(SHARED.theme.getIcon("unchecked", "red"))
|
||||
aTwo.triggered.connect(qtLambda(self._iterItemActive, False))
|
||||
else:
|
||||
action = qtAddAction(self, self.tr("Toggle Active"))
|
||||
|
||||
Reference in New Issue
Block a user