forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the slide_puzzle canvas size on wasm
Since winit can't handle resize from the CSS or JS, work it around in the demo by calling set_size on the slint window. Also fix slint_size panicking not working on wasm as the map_state was mutably borrowed by the set_size, and this may recurse into other functions (eg, draw) causing a panic. So don't keep the state borrowed when calling winit. Another fix is fixing the initialization size of the window item when the initial size is set with set_size Fixes slint-ui#547
- Loading branch information
Showing
3 changed files
with
66 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters