Skip to main content

text_control_height

Function text_control_height 

pub fn text_control_height(authored: f64, theme: &Theme) -> f64
Expand description

Height of a shell control that carries one line of body text — a Back chip, the slot a search field sits in — authored at 1× as authored logical px.

It grows with ui_scale like every metric, and once the theme’s body line (typography.size(TextRole::Body) at the current text scale) outgrows the room the authored height left for it, by exactly that difference: the authored padding around the line is kept and the label never overflows the control. Unchanged on a stock theme, so 1× geometry is exactly what was authored.