pub fn clamp_label_offset(
bbox: Rect,
text_width: f32,
offset: f32,
h_align: Align,
) -> f32Expand description
Clamp a block label’s horizontal offset so its text of width text_width
stays within the block’s horizontal extent, given the label’s horizontal
anchor — Align::Center for the title, Align::Min (left) for the
type, Align::Max (right) for the tag. When the text is wider
than the block the label is pinned flush to its anchored edge.