Skip to main content

Module recipe_checkbox_style

Module recipe_checkbox_style 

Source
Expand description

Default CheckboxStyle impl driven by paint-recipe data.

RecipeCheckboxStyle ships the IntUI look out of the box; apps that want a different design language (Material 3 round checkbox, glyph badge, custom check shape) write their own impl CheckboxStyle block and install it per-call (Checkbox::style(...)) or theme-wide (theme.style_slots.checkbox = Some(Rc::new(MyCheckbox))).

The visual body is a small leaf widget (CheckboxBody) that paints the box + check / dash glyph directly onto the canvas. Same trade-off as RecipeToggleStyle: a leaf keeps paint-cost parity with the pre-refactor Checkbox; custom impls are free to compose primitives (RectWidget + IconWidget in a ZStack) if they prefer.

Structs§

CheckboxRecipe
Configurable dimensions for RecipeCheckboxStyle.
RecipeCheckboxStyle
Default CheckboxStyle shipped with Teksilo. Colors come from theme.colors.{accent, accent_hover, accent_pressed, accent_disabled, border, border_strong, border_focused, text_on_accent, text_disabled}.

Constants§

CHECKBOX_BOX_HIT_AREA
CHECKBOX_BOX_VISUAL_SIZE
CHECKBOX_CORNER_RADIUS
CHECKBOX_LABEL_GAP