Add a base button size, and make it default for switches and tool buttons

This commit is contained in:
Veronica Berglyd Olsen
2024-04-01 15:39:54 +02:00
parent cfde84f851
commit c000307f14
5 changed files with 18 additions and 15 deletions
+4 -3
View File
@@ -53,12 +53,13 @@ class GuiLipsum(QDialog):
self.setWindowTitle(self.tr("Insert Placeholder Text"))
vSp = CONFIG.pxInt(4)
nPx = CONFIG.pxInt(64)
self.innerBox = QHBoxLayout()
self.innerBox.setSpacing(CONFIG.pxInt(16))
# Icon
nPx = CONFIG.pxInt(64)
vSp = CONFIG.pxInt(4)
self.docIcon = QLabel()
self.docIcon.setPixmap(SHARED.theme.getPixmap("proj_document", (nPx, nPx)))
@@ -78,7 +79,7 @@ class GuiLipsum(QDialog):
self.paraCount.setValue(5)
self.randLabel = QLabel(self.tr("Randomise order"))
self.randSwitch = NSwitch()
self.randSwitch = NSwitch(self)
self.formBox = QGridLayout()
self.formBox.addWidget(self.headLabel, 0, 0, 1, 2, Qt.AlignLeft)
+7 -7
View File
@@ -187,43 +187,43 @@ class GuiWritingStats(QDialog):
self.infoForm.setRowStretch(6, 1)
# Filter Options
sPx = SHARED.theme.baseIconSize
iPx = SHARED.theme.baseIconSize
self.filterBox = QGroupBox(self.tr("Filters"), self)
self.filterForm = QGridLayout(self)
self.filterBox.setLayout(self.filterForm)
self.incNovel = NSwitch(self, height=sPx)
self.incNovel = NSwitch(self, height=iPx)
self.incNovel.setChecked(
pOptions.getBool("GuiWritingStats", "incNovel", True)
)
self.incNovel.clicked.connect(self._updateListBox)
self.incNotes = NSwitch(self, height=sPx)
self.incNotes = NSwitch(self, height=iPx)
self.incNotes.setChecked(
pOptions.getBool("GuiWritingStats", "incNotes", True)
)
self.incNotes.clicked.connect(self._updateListBox)
self.hideZeros = NSwitch(self, height=sPx)
self.hideZeros = NSwitch(self, height=iPx)
self.hideZeros.setChecked(
pOptions.getBool("GuiWritingStats", "hideZeros", True)
)
self.hideZeros.clicked.connect(self._updateListBox)
self.hideNegative = NSwitch(self, height=sPx)
self.hideNegative = NSwitch(self, height=iPx)
self.hideNegative.setChecked(
pOptions.getBool("GuiWritingStats", "hideNegative", False)
)
self.hideNegative.clicked.connect(self._updateListBox)
self.groupByDay = NSwitch(self, height=sPx)
self.groupByDay = NSwitch(self, height=iPx)
self.groupByDay.setChecked(
pOptions.getBool("GuiWritingStats", "groupByDay", False)
)
self.groupByDay.clicked.connect(self._updateListBox)
self.showIdleTime = NSwitch(self, height=sPx)
self.showIdleTime = NSwitch(self, height=iPx)
self.showIdleTime.setChecked(
pOptions.getBool("GuiWritingStats", "showIdleTime", False)
)