mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Simplify event loop start-up
Move the layout constraint tracker into the window where we can apply the constraints right before drawing, instead of doing that from within the event loop. This allows to remove the component parameter from the run function.
This commit is contained in:
parent
f8e5982ab4
commit
c258a907f0
8 changed files with 57 additions and 66 deletions
|
@ -329,7 +329,7 @@ declare_types! {
|
|||
let component = cx.borrow(&mut this, |x| x.0.clone());
|
||||
let component = component.ok_or(()).or_else(|()| cx.throw_error("Invalid type"))?;
|
||||
run_scoped(&mut cx,this.downcast().unwrap(), || {
|
||||
component.window().run(&vtable::VRc::into_dyn(component));
|
||||
component.window().run();
|
||||
Ok(())
|
||||
})?;
|
||||
Ok(JsUndefined::new().as_value(&mut cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue