pub fn contain_rect(inner: Rect, bounds: Rect) -> RectExpand description
Translate inner minimally so it lies within bounds — shifting, not
shrinking. On an axis where inner is larger than bounds, it is centered.
Used to keep a block’s icon inside the block.