summaryrefslogtreecommitdiffstats
path: root/lazy
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-02-23 15:58:39 +0700
committerLibravatar GitHub <noreply@github.com>2022-02-23 15:58:39 +0700
commite0185b8cda82a0092386a2b5a7e2ca0a3a2f0a25 (patch)
tree0fadb296a8f49f7407884f9065a8948a9d1875ca /lazy
parentadce9e04213803bd775538efddf6e7908d1c605e (diff)
parenta12a92c266ee0127456ae3711b246f9148e65f72 (diff)
downloadiced-e0185b8cda82a0092386a2b5a7e2ca0a3a2f0a25.tar.gz
iced-e0185b8cda82a0092386a2b5a7e2ca0a3a2f0a25.tar.bz2
iced-e0185b8cda82a0092386a2b5a7e2ca0a3a2f0a25.zip
Merge pull request #1262 from nicksenger/fix/overlay-layouts
Fix: overlay layout for `Responsive`
Diffstat (limited to '')
-rw-r--r--lazy/src/responsive.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs
index 35ad6974..d01cfd68 100644
--- a/lazy/src/responsive.rs
+++ b/lazy/src/responsive.rs
@@ -178,7 +178,7 @@ where
let content_layout = state.layout(layout);
match content {
- Content::Pending(_) => false,
+ Content::Pending(_) => None,
Content::Ready(cache) => {
*cache = Some(
CacheBuilder {
@@ -190,14 +190,19 @@ 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(|| {
+ has_overlay.map(|position| {
overlay::Element::new(
- layout.position(),
+ position,
Box::new(Overlay { instance: self }),
)
})