Actually compute the layout of elements within a for loop

This commit is contained in:
Olivier Goffart 2020-09-07 14:04:14 +02:00
parent d924ec6bd9
commit 16f5cf42e3
6 changed files with 69 additions and 5 deletions

View file

@ -81,4 +81,11 @@ where
pub fn borrow_item_vec(&self) -> core::cell::Ref<Vec<Pin<Rc<C>>>> {
self.components.borrow()
}
/// Recompute the layout of each chile elements
pub fn compute_layout(&self) {
for c in self.components.borrow().iter() {
c.as_ref().compute_layout();
}
}
}