All trewwidgets needs font set ...

This commit is contained in:
Veronica K. B. Olsen
2020-06-01 12:17:07 +02:00
parent 4464171cb4
commit ca5a6ad8aa
2 changed files with 17 additions and 3 deletions
+11 -3
View File
@@ -57,6 +57,7 @@ class GuiProjectLoad(QDialog):
self.mainConf = nw.CONFIG
self.theParent = theParent
self.theTheme = theParent.theTheme
self.openState = self.NONE_STATE
self.openPath = None
@@ -70,7 +71,7 @@ class GuiProjectLoad(QDialog):
self.setMinimumHeight(400)
self.setModal(True)
self.guiDeco = self.theParent.theTheme.loadDecoration("nwicon", (96, 96))
self.guiDeco = self.theTheme.loadDecoration("nwicon", (96, 96))
self.innerBox.addWidget(self.guiDeco, 0, Qt.AlignTop)
self.projectForm = QGridLayout()
@@ -89,6 +90,9 @@ class GuiProjectLoad(QDialog):
treeHead = self.listBox.headerItem()
treeHead.setTextAlignment(1, Qt.AlignRight)
treeHead.setTextAlignment(2, Qt.AlignRight)
treeHead.setFont(0, self.theTheme.guiFont)
treeHead.setFont(1, self.theTheme.guiFont)
treeHead.setFont(2, self.theTheme.guiFont)
self.lblRecent = QLabel("<b>Recently Opened Projects</b>")
self.lblPath = QLabel("<b>Path</b>")
@@ -251,8 +255,12 @@ class GuiProjectLoad(QDialog):
newItem.setText(1, formatInt(listData[timeStamp][1]))
newItem.setText(2, datetime.fromtimestamp(timeStamp).strftime("%x %X"))
newItem.setText(3, listData[timeStamp][2])
newItem.setTextAlignment(1, Qt.AlignRight)
newItem.setTextAlignment(2, Qt.AlignRight)
newItem.setTextAlignment(0, Qt.AlignLeft | Qt.AlignVCenter)
newItem.setTextAlignment(1, Qt.AlignRight | Qt.AlignVCenter)
newItem.setTextAlignment(2, Qt.AlignRight | Qt.AlignVCenter)
newItem.setFont(0, self.theTheme.guiFont)
newItem.setFont(1, self.theTheme.guiFont)
newItem.setFont(2, self.theTheme.guiFont)
self.listBox.addTopLevelItem(newItem)
if not hasSelection:
newItem.setSelected(True)
+6
View File
@@ -450,6 +450,10 @@ class GuiProjectEditReplace(QWidget):
self.listBox.itemSelectionChanged.connect(self._selectedItem)
self.listBox.setIndentation(0)
treeHead = self.listBox.headerItem()
treeHead.setFont(0, self.theTheme.guiFont)
treeHead.setFont(1, self.theTheme.guiFont)
for aKey, aVal in self.theProject.autoReplace.items():
newItem = QTreeWidgetItem(["<%s>" % aKey, aVal])
self.listBox.addTopLevelItem(newItem)
@@ -542,6 +546,8 @@ class GuiProjectEditReplace(QWidget):
saveKey = "<keyword%d>" % (self.listBox.topLevelItemCount() + 1)
newVal = ""
newItem = QTreeWidgetItem([saveKey, newVal])
newItem.setFont(0, self.theTheme.guiFont)
newItem.setFont(1, self.theTheme.guiFont)
self.listBox.addTopLevelItem(newItem)
return True