summaryrefslogtreecommitdiffstats
path: root/lazy
diff options
context:
space:
mode:
authorLibravatar cossonleo <cossonleo@foxmail.com>2022-01-20 11:10:07 +0800
committerLibravatar cossonleo <cossonleo@foxmail.com>2022-01-20 11:35:45 +0800
commit41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2 (patch)
treeef70aa88a492b52a73d10e5810b46e058daeefeb /lazy
parenta3744ec97a462557ab9a3d2509f02263f425fd28 (diff)
downloadiced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.tar.gz
iced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.tar.bz2
iced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.zip
component overlay position fix
Diffstat (limited to 'lazy')
-rw-r--r--lazy/src/component.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/lazy/src/component.rs b/lazy/src/component.rs
index 2b729045..4136aa9f 100644
--- a/lazy/src/component.rs
+++ b/lazy/src/component.rs
@@ -263,14 +263,16 @@ where
.build(),
);
- cache.as_ref().unwrap().borrow_overlay().is_some()
+ cache
+ .as_ref()
+ .unwrap()
+ .borrow_overlay()
+ .as_ref()
+ .map(|overlay| overlay.position())
});
- has_overlay.then(|| {
- overlay::Element::new(
- layout.position(),
- Box::new(Overlay { instance: self }),
- )
+ has_overlay.map(|pos| {
+ overlay::Element::new(pos, Box::new(Overlay { instance: self }))
})
}
}