Ticket #977 (new idea)
themeable widgets with container inheritance
|Reported by:||ArcRiley||Owned by:|
Classes in the soy.widgets namespace (children of soy.widgets.Widget) provide 2d rendering in a window.
There are several container widgets (children of soy.widgets.Container) such as StackX (aka hbox), StackY (aka vbox), StackZ (widgets layered on top of each other), and eventually more functional containers with scrollable windows and tabs.
Non-container widgets include the Projector (which attaches to a Camera to render a scene), Canvas (for rendering images), and soon widgets for rendering text with pango, file selection dialogs, "tree" structure information such as buddy lists, etc.
We want a clean way to set and override theming for these widgets from Python - ie, a theme struct as part of every widget setup such that unset values inherit from their parent. This would likely take two copies of this struct in every widget object, theme values set locally and compiled theme values based on containers, so the theme can be properly updated when parent values are changed (overridden values stay overridden, inherited values inherit)
This way a theme, such as text color or border svg, can be set for a whole window and apply even to widgets loaded and managed indirectly (ie, roster and chat widgets from soy.transports.XMPP).