Merge pull request #1262 from nicksenger/fix/overlay-layouts
Fix: overlay layout for `Responsive`
This commit is contained in:
commit
e0185b8cda
1 changed files with 9 additions and 4 deletions
|
|
@ -178,7 +178,7 @@ where
|
||||||
let content_layout = state.layout(layout);
|
let content_layout = state.layout(layout);
|
||||||
|
|
||||||
match content {
|
match content {
|
||||||
Content::Pending(_) => false,
|
Content::Pending(_) => None,
|
||||||
Content::Ready(cache) => {
|
Content::Ready(cache) => {
|
||||||
*cache = Some(
|
*cache = Some(
|
||||||
CacheBuilder {
|
CacheBuilder {
|
||||||
|
|
@ -190,14 +190,19 @@ where
|
||||||
.build(),
|
.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(
|
overlay::Element::new(
|
||||||
layout.position(),
|
position,
|
||||||
Box::new(Overlay { instance: self }),
|
Box::new(Overlay { instance: self }),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue