From bc3e16619e573be45bc005f15de84ecd6da96856 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 27 Feb 2024 10:32:24 -0700 Subject: [PATCH] Fix popover bottom position --- src/widget/popover.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widget/popover.rs b/src/widget/popover.rs index 6f445e1b..e6b611ae 100644 --- a/src/widget/popover.rs +++ b/src/widget/popover.rs @@ -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) }