Expand description
The slot-typed lookup table that backs the new theme API.
A Slot is a typed entry in the theme document: it is always either a
Color, a Paint (that is a gradient — solid colours live in the
Color variant), an outer Shadow stack, a composite Surface or
a TextStyle. Widgets resolve them through SlotStore.
§Promotion
The store offers five accessors (color, paint, shadows, surface,
text_style). They promote automatically wherever it makes sense: asking
for a paint against a colour slot returns Paint::Solid(c); asking for a
surface against a colour returns a Surface with fill: Solid(c) and
empty decorations; asking for a surface against a paint returns a
Surface wrapping that paint. Stricter requests that cannot be satisfied
(asking for a TextStyle against a colour, for example) return None.
Structs§
- Optional free-form annotations a theme author can attach to any slot. The runtime ignores these — inspection tools (and human readers of the JSON) use them.
- Lookup table indexed by slot id.
Enums§
- One typed entry of the theme.