mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
86bc3e612d
Before this change, clients were expected to set up the current material (color or image) before laying out Labels and Editors. This was done to avoid garbage from a hypothetical material interface covering both colors and images. However, some widgets need more than one material: the Editor had HintImage for the hint text material. This change implements generalized materials through blocks: anywhere a material is expected, a ui.BlockOp is is assumed to contain the operation(s) needed for setting the desired material. This way we avoid allocations (interfaces) and keep the abstraction over material types. Signed-off-by: Elias Naur <mail@eliasnaur.com>