From 4caa17f5aee47b13e1c14b6cc3f69636b3cafbb0 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 2 Nov 2019 21:23:00 +0100 Subject: [PATCH] Some minor code tweaks --- nw/gui/dialogs/configeditor.py | 14 +++++++------- nw/gui/elements/viewdetails.py | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/nw/gui/dialogs/configeditor.py b/nw/gui/dialogs/configeditor.py index 031af758..a77dcfc8 100644 --- a/nw/gui/dialogs/configeditor.py +++ b/nw/gui/dialogs/configeditor.py @@ -328,11 +328,11 @@ class GuiConfigEditEditor(QWidget): self.textFlowFixed.setCheckState(Qt.Checked) else: self.textFlowFixed.setCheckState(Qt.Unchecked) - self.textFlowWidth = QSpinBox(self) - self.textFlowWidth.setMinimum(300) - self.textFlowWidth.setMaximum(10000) - self.textFlowWidth.setSingleStep(10) - self.textFlowWidth.setValue(self.mainConf.textWidth) + self.textFlowMax = QSpinBox(self) + self.textFlowMax.setMinimum(300) + self.textFlowMax.setMaximum(10000) + self.textFlowMax.setSingleStep(10) + self.textFlowMax.setValue(self.mainConf.textWidth) self.textFlowJustify = QCheckBox("Justify text",self) self.textFlowJustify.setToolTip("Justify text in main document editor.") @@ -342,7 +342,7 @@ class GuiConfigEditEditor(QWidget): self.textFlowJustify.setCheckState(Qt.Unchecked) self.textFlowForm.addWidget(self.textFlowFixed, 0, 0) - self.textFlowForm.addWidget(self.textFlowWidth, 0, 1) + self.textFlowForm.addWidget(self.textFlowMax, 0, 1) self.textFlowForm.addWidget(QLabel("px"), 0, 2) self.textFlowForm.addWidget(self.textFlowJustify, 1, 0) self.textFlowForm.setColumnStretch(4, 1) @@ -519,7 +519,7 @@ class GuiConfigEditEditor(QWidget): self.mainConf.textFont = textFont self.mainConf.textSize = textSize - textWidth = self.textFlowWidth.value() + textWidth = self.textFlowMax.value() textFixedW = self.textFlowFixed.isChecked() doJustify = self.textFlowJustify.isChecked() diff --git a/nw/gui/elements/viewdetails.py b/nw/gui/elements/viewdetails.py index 1dfe5118..a4eb4bc1 100644 --- a/nw/gui/elements/viewdetails.py +++ b/nw/gui/elements/viewdetails.py @@ -65,8 +65,7 @@ class GuiDocViewDetails(QWidget): self.scrollBox.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.scrollBox.setFrameStyle(QFrame.NoFrame) self.scrollBox.setWidgetResizable(True) - self.scrollBox.setMaximumHeight(300) - self.scrollBox.setMinimumHeight(60) + self.scrollBox.setFixedHeight(80) self.scrollBox.setWidget(self.refList) self.outerBox.addWidget(self.showHide, 0, 0)