Fix layout translation in overlay::Group
This bug produced improper positioning of overlays of elements inside a `Scrollable`.
This commit is contained in:
parent
a28bc3eaf0
commit
a50cc32d09
7 changed files with 33 additions and 18 deletions
|
|
@ -455,9 +455,9 @@ where
|
|||
position: Point,
|
||||
) -> layout::Node {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
let vector = position - overlay.position();
|
||||
let translation = position - overlay.position();
|
||||
|
||||
overlay.layout(renderer, bounds).translate(vector)
|
||||
overlay.layout(renderer, bounds, translation)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,9 +313,9 @@ where
|
|||
position: Point,
|
||||
) -> layout::Node {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
let vector = position - overlay.position();
|
||||
let translation = position - overlay.position();
|
||||
|
||||
overlay.layout(renderer, bounds).translate(vector)
|
||||
overlay.layout(renderer, bounds, translation)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,9 +356,9 @@ where
|
|||
position: Point,
|
||||
) -> layout::Node {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
let vector = position - overlay.position();
|
||||
let translation = position - overlay.position();
|
||||
|
||||
overlay.layout(renderer, bounds).translate(vector)
|
||||
overlay.layout(renderer, bounds, translation)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue