batgrl.gadgets.behaviors.themable#
Themable behavior for gadgets.
Classes
|
Themable behavior for a gadget. |
- class batgrl.gadgets.behaviors.themable.Themable#
Bases:
ABC,objectThemable behavior for a gadget.
Themable gadgets share a color theme. They must implement
update_theme()which paints the gadget with current theme.Whenever the running app’s theme is changed, update_theme will be called for all
Themablegadgets.Methods
get_color(color_name)
Get a color by name from the current color theme.
update_theme()
Paint the gadget with current theme.
- color_theme: ColorTheme#
- classmethod get_color(color_name: ColorThemeColor) Color#
Get a color by name from the current color theme.
- on_add() None#
Update theme.
- abstractmethod update_theme() None#
Paint the gadget with current theme.