Skip to main content

centered_windowed_rect

Function centered_windowed_rect 

Source
pub fn centered_windowed_rect(
    monitor: MonitorRect,
    fraction: f64,
) -> MonitorRect
Expand description

Shrink monitor to fraction of its size and centre it inside the original. fraction is clamped to [0.1, 1.0]. Used to size the BreakDelivery::Windowed overlay so the desktop stays clickable around it.