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
|
|
@ -66,13 +66,15 @@ where
|
|||
&self,
|
||||
renderer: &Renderer,
|
||||
bounds: Size,
|
||||
_position: Point,
|
||||
position: Point,
|
||||
) -> layout::Node {
|
||||
let translation = position - Point::ORIGIN;
|
||||
|
||||
layout::Node::with_children(
|
||||
bounds,
|
||||
self.children
|
||||
.iter()
|
||||
.map(|child| child.layout(renderer, bounds))
|
||||
.map(|child| child.layout(renderer, bounds, translation))
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue