Fix popover bottom position

This commit is contained in:
Jeremy Soller 2024-02-27 10:32:24 -07:00
parent 9eeaf816dc
commit bc3e16619e
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -178,10 +178,14 @@ where
// Calculate overlay position from relative position
let mut overlay_position = match self.position {
Position::Center | Position::Bottom => Point::new(
Position::Center => Point::new(
bounds.x + bounds.width / 2.0,
bounds.y + bounds.height / 2.0,
),
Position::Bottom => Point::new(
bounds.x + bounds.width / 2.0,
bounds.y + bounds.height,
),
Position::Point(relative) => {
bounds.position() + Vector::new(relative.x, relative.y)
}