Skip to main content

Module slider

Module slider 

Source

Structs§

Slider
#[serde(from = "SliderRaw")]: like switch/countdown, paint() draws from this component’s own fields, never layout.width/ layout.height — box_builder.rs’s css.width/height = Px(c.width / c.height) only budgets for the thin track, not the round thumb (thumb_size, typically bigger than the track) that can sit centered on either end, nor the show_value “N%” label that floats above it (#127 measured 396×7 assigned vs. 417×31 painted). The raw shadow struct computes the true bounding box once — same font metrics paint() uses — and folds it into style.width/style.height before box_builder.rs ever runs, without editing that file. paint() itself is updated below to offset its drawing into that box instead of treating local (0,0) as the thumb’s top-left.