Update test coverage

This commit is contained in:
Veronica Berglyd Olsen
2025-10-26 03:16:22 +01:00
parent a703e0bb7d
commit f2c2833985
4 changed files with 31 additions and 14 deletions
+2 -6
View File
@@ -27,7 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
""" # noqa
from __future__ import annotations
from PyQt6.QtGui import QColor, QFont, QPalette, QPixmap
from PyQt6.QtGui import QColor, QFont, QPalette
from PyQt6.QtWidgets import (
QAbstractButton, QFrame, QHBoxLayout, QLabel, QLayout, QScrollArea,
QVBoxLayout, QWidget
@@ -170,7 +170,7 @@ class NScrollableForm(QScrollArea):
def addRow(
self,
label: str | None,
widget: QWidget | list[QWidget | QPixmap | int],
widget: QWidget | list[QWidget | int],
helpText: str = "",
unit: str | None = None,
button: QWidget | None = None,
@@ -187,10 +187,6 @@ class NScrollableForm(QScrollArea):
for item in widget:
if isinstance(item, QWidget):
wBox.addWidget(item)
elif isinstance(item, QPixmap):
icon = QLabel(self)
icon.setPixmap(item)
wBox.addWidget(icon)
elif isinstance(item, int):
wBox.addSpacing(item)
qWidget = QWidget(self)
+4 -4
View File
@@ -241,9 +241,9 @@ class NIconToolButton(QToolButton):
if icon:
self.setThemeIcon(icon, color)
def setThemeIcon(self, iconKey: str, color: str | None = None) -> None:
def setThemeIcon(self, icon: str, color: str | None = None) -> None:
"""Set an icon from the current theme."""
self.setIcon(SHARED.theme.getIcon(iconKey, color))
self.setIcon(SHARED.theme.getIcon(icon, color))
class NIconToggleButton(QToolButton):
@@ -262,10 +262,10 @@ class NIconToggleButton(QToolButton):
if icon:
self.setThemeIcon(icon)
def setThemeIcon(self, iconKey: str) -> None:
def setThemeIcon(self, icon: str) -> None:
"""Set an icon from the current theme."""
size = self.iconSize()
self.setIcon(SHARED.theme.getToggleIcon(iconKey, (size.width(), size.height())))
self.setIcon(SHARED.theme.getToggleIcon(icon, (size.width(), size.height())))
class NClickableLabel(QLabel):