Update tests and add more debug output

This commit is contained in:
Veronica Berglyd Olsen
2025-10-26 02:40:50 +01:00
parent e0bd7d82fb
commit a703e0bb7d
14 changed files with 67 additions and 11 deletions
+11 -4
View File
@@ -263,10 +263,7 @@ class GuiManuscript(NToolDialog):
def updateTheme(self, *, init: bool = False) -> None:
"""Update theme elements."""
self.tbAdd.setThemeIcon("add", "green")
self.tbDel.setThemeIcon("remove", "red")
self.tbCopy.setThemeIcon("copy", "blue")
self.tbEdit.setThemeIcon("edit", "green")
logger.debug("Theme Update: GuiManuscript, init=%s", init)
if not init:
self.btnPreview.updateIcon()
@@ -274,6 +271,11 @@ class GuiManuscript(NToolDialog):
self.btnBuild.updateIcon()
self.btnClose.updateIcon()
self.tbAdd.setThemeIcon("add", "green")
self.tbDel.setThemeIcon("remove", "red")
self.tbCopy.setThemeIcon("copy", "blue")
self.tbEdit.setThemeIcon("edit", "green")
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.tbAdd.setStyleSheet(buttonStyle)
self.tbDel.setStyleSheet(buttonStyle)
@@ -641,6 +643,7 @@ class _DetailsWidget(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
if self._build:
logger.debug("Theme Update: _DetailsWidget")
self.updateInfo(self._build)
@@ -709,6 +712,7 @@ class _OutlineWidget(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
logger.debug("Theme Update: _OutlineWidget")
self.updateOutline(self._outline, force=True)
##
@@ -845,6 +849,8 @@ class _PreviewWidget(QTextBrowser):
def updateTheme(self) -> None:
"""Update theme elements."""
logger.debug("Theme Update: _PreviewWidget")
palette = QApplication.palette()
palette.setColor(QPalette.ColorRole.Window, palette.toolTipBase().color())
palette.setColor(QPalette.ColorRole.WindowText, palette.toolTipText().color())
@@ -984,6 +990,7 @@ class _StatsWidget(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
logger.debug("Theme Update: _StatsWidget")
self.toggleButton.setThemeIcon("unfold")
##
+8 -1
View File
@@ -173,6 +173,8 @@ class GuiBuildSettings(NToolDialog):
def updateTheme(self, *, init: bool = False) -> None:
"""Update theme elements."""
logger.debug("Theme Update: GuiBuildSettings, init=%s", init)
if not init:
self.btnApply.updateIcon()
self.btnSave.updateIcon()
@@ -405,6 +407,8 @@ class _FilterTab(NFixedPage):
def updateTheme(self, *, init: bool = False) -> None:
"""Update theme elements."""
logger.debug("Theme Update: _FilterTab, init=%s", init)
if not init:
self._statusFlags[self.F_FILTERED] = SHARED.theme.getIcon("filter", "orange")
self._statusFlags[self.F_INCLUDED] = SHARED.theme.getIcon("pin", "blue")
@@ -805,6 +809,8 @@ class _HeadingsTab(NScrollablePage):
def updateTheme(self) -> None:
"""Update theme elements."""
logger.debug("Theme Update: _HeadingsTab")
self.btnPart.setThemeIcon("edit", "green")
self.btnChapter.setThemeIcon("edit", "green")
self.btnUnnumbered.setThemeIcon("edit", "green")
@@ -1310,12 +1316,13 @@ class _FormattingTab(NScrollableForm):
def updateTheme(self) -> None:
"""Update theme elements."""
iPx = SHARED.theme.baseIconHeight
logger.debug("Theme Update: _FormattingTab")
self.ignoredKeywordsButton.setThemeIcon("add", "green")
self.btnTextFont.setThemeIcon("font")
self.btnPageHeader.setThemeIcon("revert", "green")
iPx = SHARED.theme.baseIconHeight
self.pixT.setPixmap(SHARED.theme.getPixmap("margin_top", (iPx, iPx)))
self.pixB.setPixmap(SHARED.theme.getPixmap("margin_bottom", (iPx, iPx)))
self.pixL.setPixmap(SHARED.theme.getPixmap("margin_left", (iPx, iPx)))