pub struct CalendarDayConfig {
pub label: String,
pub fill: Signal<CalendarDayFill>,
pub is_today: bool,
pub is_out_of_month: bool,
pub is_disabled: bool,
pub is_focused_cell: Signal<bool>,
pub cell_size: f32,
}Expand description
Per-day cell input to CalendarStyle::make_day_cell.
The static fields (is_today, is_out_of_month, is_disabled)
don’t change within a build session — the calendar binds
visible_month at Rebuild level, so cells are regenerated when
the visible month moves. Everything reactive (selection fill, the
roving-focus ring) flows through Signals so per-click navigation
doesn’t tear down the 42-cell subtree.
label is passed as a plain string rather than a pre-built widget
id so the recipe owns the label’s text-colour binding — the label
colour depends on the reactive fill state (Selected → OnAccent,
otherwise Primary) which is paint-time data, not widget-construction
data.
Fields§
§label: StringDay-number string (e.g. "15"). The recipe builds the
TextWidget itself so it can drive the text colour from
fill (Selected → OnAccent, otherwise Primary). Accepts
either a plain String or a LocalizedString from tr!(…) —
LocalizedString implements From<…> for String,
so .into() covers both shapes. Day numbers are pure digits
in IntUI and pass through as untranslated literals, but a
custom recipe is free to localize.
fill: Signal<CalendarDayFill>Reactive selection-derived fill.
is_today: booltrue when this cell’s date equals the local “today”. The
recipe paints the today ring on top of any selection fill.
is_out_of_month: booltrue when this cell’s date falls outside the currently-visible
month (leading / trailing 7-day padding). The recipe usually
dims the label.
is_disabled: booltrue when this cell is unselectable (filter, min/max, etc.).
The recipe forces a disabled appearance regardless of fill.
is_focused_cell: Signal<bool>true only while the parent calendar holds keyboard focus AND
this cell’s date is the currently-focused one (roving focus).
cell_size: f32Cell edge length — the recipe sizes its rect to this.