Skip to main content

centered_capped

Function centered_capped 

Source
pub fn centered_capped(
    area: Rect,
    percent_x: u16,
    percent_y: u16,
    max_cols: u16,
    max_rows: u16,
) -> Rect
Expand description

Centre a box sized by percentage but capped at what its content needs.