jdxi_editor.jdxi.style.icons
Icon registry for JD-Xi Editor.
Provides centralized icon definitions and retrieval with fallback support.
Classes
Centralized icon definitions and retrieval |
Module Contents
- class jdxi_editor.jdxi.style.icons.IconRegistry[source]
Centralized icon definitions and retrieval
- static get_icon(icon_name: str, color: str = None, size: int = None, fallback: str = None) PySide6.QtGui.QIcon[source]
Get icon with fallback support.
- Parameters:
icon_name – Icon identifier (e.g., “msc.run”)
color – Optional color string (e.g., “#FF0000” or JDXiStyle.FOREGROUND)
size – Optional size in pixels (defaults to JDXiStyle.ICON_SIZE)
fallback – Fallback icon if primary fails
- Returns:
QIcon or None if both fail
- static get_icon_pixmap(icon_name: str, color: str = None, size: int = None, fallback: str = None)[source]
Get icon as QPixmap with fallback support.
- Parameters:
icon_name – Icon identifier
color – Optional color string
size – Optional size in pixels (defaults to JDXiStyle.ICON_SIZE)
fallback – Fallback icon if primary fails
- Returns:
QPixmap or None if all fail
- static get_icon_safe(icon_name: str, color: str = None, size: int = None, fallback: str = None) PySide6.QtGui.QIcon[source]
Get icon with fallback support, returns empty QIcon if all fail.
This version always returns a QIcon object (may be empty).
- Parameters:
icon_name – Icon identifier
color – Optional color string
size – Optional size in pixels (unused, kept for compatibility)
fallback – Fallback icon if primary fails
- Returns:
QIcon (may be empty if all fail)