Add updateTheme functions to remaining GUI components

This commit is contained in:
Veronica Berglyd Olsen
2022-10-25 23:42:43 +02:00
parent 52ede26f3d
commit 88183cdc39
8 changed files with 113 additions and 66 deletions
+11 -4
View File
@@ -53,12 +53,8 @@ class GuiItemDetails(QWidget):
hSp = self.mainConf.pxInt(6)
vSp = self.mainConf.pxInt(1)
mPx = self.mainConf.pxInt(6)
iPx = self.mainTheme.baseIconSize
fPt = self.mainTheme.fontPointSize
self._expCheck = self.mainTheme.getPixmap("check", (iPx, iPx))
self._expCross = self.mainTheme.getPixmap("cross", (iPx, iPx))
fntLabel = QFont()
fntLabel.setBold(True)
fntLabel.setPointSizeF(0.9*fPt)
@@ -179,6 +175,8 @@ class GuiItemDetails(QWidget):
self.setLayout(self.mainBox)
self.updateTheme()
# Make sure the columns for flags and counts don't resize too often
flagWidth = self.mainTheme.getTextWidth("Mm", fntValue)
countWidth = self.mainTheme.getTextWidth("99,999", fntValue)
@@ -219,6 +217,15 @@ class GuiItemDetails(QWidget):
"""
self.updateViewBox(self._itemHandle)
def updateTheme(self):
"""Update theme elements.
"""
iPx = self.mainTheme.baseIconSize
self._expCheck = self.mainTheme.getPixmap("check", (iPx, iPx))
self._expCross = self.mainTheme.getPixmap("cross", (iPx, iPx))
self.updateViewBox(self._itemHandle)
return
##
# Public Slots
##