mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +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
|
@ -84,9 +84,7 @@ public:
|
|||
template<typename Component>
|
||||
void run(const Component *c) const
|
||||
{
|
||||
auto self_rc = c->self_weak.lock().value();
|
||||
sixtyfps_component_window_run(&inner,
|
||||
reinterpret_cast<cbindgen_private::ComponentRc *>(&self_rc));
|
||||
sixtyfps_component_window_run(&inner);
|
||||
}
|
||||
|
||||
float scale_factor() const { return sixtyfps_component_window_get_scale_factor(&inner); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue