diff options
author | 2022-01-20 11:10:07 +0800 | |
---|---|---|
committer | 2022-01-20 11:35:45 +0800 | |
commit | 41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2 (patch) | |
tree | ef70aa88a492b52a73d10e5810b46e058daeefeb /lazy | |
parent | a3744ec97a462557ab9a3d2509f02263f425fd28 (diff) | |
download | iced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.tar.gz iced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.tar.bz2 iced-41bd984d6bf629bf2e9e6c45c800ff2fd4bf75b2.zip |
component overlay position fix
Diffstat (limited to 'lazy')
-rw-r--r-- | lazy/src/component.rs | 14 |
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 })) }) } } |