summaryrefslogtreecommitdiffstats
path: root/widget/src/lazy
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-01 04:15:09 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-01 04:15:09 +0200
commit548b9d0294cb18a79e1adb9629912e16a4fc353e (patch)
treec799de19dddd2244b567923a239850701657c432 /widget/src/lazy
parent6758de2b4348d8990205721027524cf87a9db128 (diff)
downloadiced-548b9d0294cb18a79e1adb9629912e16a4fc353e.tar.gz
iced-548b9d0294cb18a79e1adb9629912e16a4fc353e.tar.bz2
iced-548b9d0294cb18a79e1adb9629912e16a4fc353e.zip
Fix `Widget::layout` for `Component`
Diffstat (limited to 'widget/src/lazy')
-rw-r--r--widget/src/lazy/component.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs
index fba057ee..fe99a7f2 100644
--- a/widget/src/lazy/component.rs
+++ b/widget/src/lazy/component.rs
@@ -258,8 +258,14 @@ where
renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
+ let t = tree.state.downcast_mut::<Rc<RefCell<Option<Tree>>>>();
+
self.with_element(|element| {
- element.as_widget().layout(tree, renderer, limits)
+ element.as_widget().layout(
+ &mut t.borrow_mut().as_mut().unwrap().children[0],
+ renderer,
+ limits,
+ )
})
}