pub fn calculate_overlay_position(
trigger: OverlayRect,
overlay_size: OverlayRect,
boundary: OverlayRect,
requested: OverlayPlacement,
fallback_placements: &[OverlayPlacement],
offset: OverlayOffset,
boundary_padding: f64,
) -> OverlayPositionExpand description
Calculate a viewport-aware overlay position.
overlay_size.x and overlay_size.y are ignored; only width and height are
used. If no candidate fully fits, the placement with the largest visible
area is selected and clamped inside the padded boundary as far as possible.