Skip to main content

centred_rect

Function centred_rect 

Source
pub fn centred_rect(outer: Rect, width: u16, height: u16) -> Rect
Expand description

Centre a width x height rectangle inside outer, clipping if the outer is smaller than the requested size.

Shared helper used by Dialog::preferred_size default impl and by individual dialog implementations that override it.