Skip to main content

Module recipe_panel_style

Module recipe_panel_style 

Source
Expand description

Default PanelStyle impl driven by paint-recipe data.

RecipePanelStyle ships the IntUI panel chrome — variant-driven background / border / corner-radius defaults, with caller overrides winning when set. Custom styles compose freely (glassmorphism panel, brutalist box, etc.) by writing their own impl PanelStyle block.

The body is a single PanelFrame container widget that paints the chrome AND positions the content with padding inset — done in one widget so the proposal-resolve / intrinsic-size logic mirrors the pre-refactor Panel (Size::new(child + 2*pad, child + 2*pad) when unspecified, proposal.resolve(...) when bounded). Wrapping Padding in a generic ZStack would break the proposal handoff: ZStack measures its children with unspecified regardless of the incoming proposal, so the chrome would inflate to the child’s preferred unwrap_or(400.0, 300.0) and overflow its parent.

Structs§

PanelRecipe
Tunable dimensions for RecipePanelStyle.
RecipePanelStyle
Default PanelStyle shipped with Teksilo. Honours all four PanelVariant values via background / border defaults; honours caller overrides (background, border, corner radius, padding) when set.

Constants§

PANEL_BORDER_WIDTH
PANEL_CORNER_RADIUS
PANEL_PADDING