Fix popover bottom position
This commit is contained in:
parent
9eeaf816dc
commit
bc3e16619e
1 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue