Icon class
Small image in the User Interface.
Icons are typically used in controls like button or items in a menu.
If a text is associated to an icon, it is rendered by the visual elements that uses this Icon.
Methods¶
__init__() ¶
__init__(
path: str,
text: t.Optional[str] = None,
light_path: t.Optional[str] = None,
dark_path: t.Optional[str] = None,
) -> None
Initialize a new Icon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to an image file. |
required |
text |
Optional[str]
|
The text associated to the image. If text is None, there is no text associated to this image. |
None
|
light_path |
Optional[str]
|
The path to the light theme image (fallback to path if not defined). |
None
|
dark_path |
Optional[str]
|
The path to the dark theme image (fallback to path if not defined). |
None
|