summaryrefslogtreecommitdiffstats
path: root/native/src/overlay/group.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-01-30 05:26:51 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-30 05:26:51 +0100
commit8c753192f82989fec5b5b506f62a8b17bf41f55a (patch)
treec53742f5ce8d958e636b15d74a4781fc99e219be /native/src/overlay/group.rs
parenta28bc3eaf05d59ef35ae5c182fa68478356364fd (diff)
parenta50cc32d09ddff1d061701074908c28d5c5509ba (diff)
downloadiced-8c753192f82989fec5b5b506f62a8b17bf41f55a.tar.gz
iced-8c753192f82989fec5b5b506f62a8b17bf41f55a.tar.bz2
iced-8c753192f82989fec5b5b506f62a8b17bf41f55a.zip
Merge pull request #1686 from iced-rs/fix/overlay-group-position
Fix layout translation in `overlay::Group`
Diffstat (limited to '')
-rw-r--r--native/src/overlay/group.rs6
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(),
)
}