pub struct SpinBoxStyleConfig {
pub field: WidgetId,
pub step_up: Option<WidgetId>,
pub step_down: Option<WidgetId>,
pub layout: ButtonLayout,
pub is_focused: Signal<bool>,
pub is_disabled: Signal<bool>,
}Fields§
§field: WidgetIdPre-built TextInputField subtree (already padded to the
caller’s policy).
step_up: Option<WidgetId>Pre-built up-step icon button. None when layout == Hidden.
step_down: Option<WidgetId>Pre-built down-step icon button. None when layout == Hidden.
layout: ButtonLayoutLayout selector — Stacked puts the buttons in a divided
vertical column to the trailing side of the field; Hidden
drops the divider and button column entirely.
is_focused: Signal<bool>Reactive focus signal — drives the border colour (focused → accent, otherwise default).
is_disabled: Signal<bool>Reactive disabled signal — the AND of the SpinBox’s own enabled
prop and every ancestor’s, via
BuildContext::effective_enabled_signal. Drives the inert grey
fill / outline. A SpinBox frames a TextInputField in neutral
roles (SurfaceRole::Content, BorderRole::Default), and the
disabled-role substitution in ColorProp::resolve only rewrites
the accent family — so unlike an accent-filled Button, this
control has to dim itself explicitly.