Make minor improvements to the code and fix test on MacOS

This commit is contained in:
Veronica Berglyd Olsen
2025-10-26 00:12:37 +02:00
parent af36a3b1bf
commit a02254f5d5
2 changed files with 13 additions and 8 deletions
+3 -4
View File
@@ -210,12 +210,11 @@ class NPushButton(QPushButton):
icon: str | None = None, color: str | None = None
) -> None:
super().__init__(parent=parent)
self.setText(text)
self.setIconSize(iconSize)
self._icon = icon
self._color = color
if icon:
self.refreshIcon()
self.setText(text)
self.setIconSize(iconSize)
self.refreshIcon()
def refreshIcon(self) -> None:
"""Reload the theme icon."""