diff options
author | 2023-01-30 05:01:28 +0100 | |
---|---|---|
committer | 2023-01-30 05:11:59 +0100 | |
commit | a50cc32d09ddff1d061701074908c28d5c5509ba (patch) | |
tree | c53742f5ce8d958e636b15d74a4781fc99e219be /native/src/overlay/group.rs | |
parent | a28bc3eaf05d59ef35ae5c182fa68478356364fd (diff) | |
download | iced-a50cc32d09ddff1d061701074908c28d5c5509ba.tar.gz iced-a50cc32d09ddff1d061701074908c28d5c5509ba.tar.bz2 iced-a50cc32d09ddff1d061701074908c28d5c5509ba.zip |
Fix layout translation in `overlay::Group`
This bug produced improper positioning of overlays of elements inside a
`Scrollable`.
Diffstat (limited to 'native/src/overlay/group.rs')
-rw-r--r-- | native/src/overlay/group.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/native/src/overlay/group.rs b/native/src/overlay/group.rs index 5c9cf809..1126f0cf 100644 --- a/native/src/overlay/group.rs +++ b/native/src/overlay/group.rs @@ -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(), ) } |