expect values as 'None' and 'QColor'

This commit is contained in:
Jakub Trllo 2024-07-10 16:00:01 +02:00
parent d15bdd494c
commit 618a76c6af

View file

@ -485,7 +485,10 @@ class _IconsCache:
parts = [icon_type, icon_def["path"]]
elif icon_type in {"awesome-font", "material-symbols"}:
parts = [icon_type, icon_def["name"], icon_def["color"]]
color = icon_def["color"] or ""
if isinstance(color, QtGui.QColor):
color = color.name()
parts = [icon_type, icon_def["name"] or "", color]
return "|".join(parts)
@classmethod