Ticket #977 (new idea)

Opened 4 years ago

Last modified 2 years ago

themeable widgets with container inheritance

Reported by: ArcRiley Owned by:
Priority: Medium Milestone: beta4
Component: soy.widgets Version: Trunk
Keywords: Cc:

Description

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).

Change History

comment:1 Changed 2 years ago by ArcRiley

  • Milestone changed from beta3 to beta4
Note: See TracTickets for help on using tickets.