Skip to main content

Module metrics

Module metrics 

Expand description

Density metrics: the control heights, hit targets, panel widths and icon sizes HIG §9.6 fixes so two panels built by two people come out the same size. Spacing says how far apart things sit; metrics say how big the things are.

Like super::Spacing these are logical pixels multiplied by crate::Theme::with_ui_scale. A custom theme’s spacing_px does not touch them: a denser gutter preference must not shrink a pointer target.

Metrics::BASE is the unscaled reference, readable from a const context so a shell constant that has to be compile-time (const PAD, a default breakpoint) names the token instead of restating its number.

Structs§

Metrics
Reference density (HIG §9.6), unscaled. Read live values from theme.tokens.metrics.