mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 13:51:13 +00:00
Actually compute the layout of elements within a for loop
This commit is contained in:
parent
d924ec6bd9
commit
16f5cf42e3
6 changed files with 69 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue