Skip to main content

Module countdown

Module countdown 

Source

Structs§

Countdown
#[serde(from = "CountdownRaw")]: box_builder.rs’s width formula for this component (visible * 2*box_w + (visible-1)*gap) doesn’t include the small inner gap (gap*0.3) paint() actually inserts within each digit pair — only the gap between pairs (the separator). That mismatch compounds with every extra group and is exactly what #127 measured (153×67 assigned vs. 187×68 painted). Since paint() draws from self.digit_size/self.gap, not layout.width (same pattern as switch/slider), the fix is to fold the exact formula paint() uses into style.width here, so box_builder.rs’s if css.width.is_none() never gets a chance to apply its slightly-off one.