Slint UI Library
Keyboard handling on the Web
The big feature this week was making text input fields work with mobile browsers. This is done by adding an
<input> element to the WASM GL backend, which makes the browser show the virtual keyboard.
This has been a pain point ever since the mobile WASM support was added.
As a result, you can now type text in our gallery or todo examples in mobile browsers.
The Open GL backend saw performance optimizations this week.
Animations are more targeted now: Instead of the content of all windows getting invalidated on an animation tick, only those that actually contain the animation get redrawn now. (#1087)
We added a
cache-rendering-hint property to the Slint language,
that you can set on any element. It provides a hint to the renderer that the element and all of its children should be rendered into a cached layer
texture (#1075). For complex sub-trees of elements that rarely change, this can speed up rendering performance a lot.
This is implemented for the GL as well as the Qt renderer.
Make it possible to disable the slint compiler from the CMake build (df2d64)
This isn't always needed, for example when using only the interpreter API, and its dependency to native libraries on Linux (namely fontconfig) makes it difficult to cross-compile with CMake.
While cargo is invoked correctly for the native binary build, the library search paths coming from CMake will be target specific, not host specific.
So for now this provides a way of disabling the compiler.
Additional collection of metrics such as the number of created layers was
added to the
SLINT_DEBUG_PERFORMANCEoutput. This can be helpful when optimizing rendering performance of Slint.
Error out when a PopupWindow is in a
forinstead of panicking(6c7a7a )
We need to move stuff in the parent element and that doesn't work if it is a repeated element. Also there would not be ways to call show on it anyway.
Fix animations not running in secondary windows with wasm (e93504)
When a second canvas is visible, only animations in the first canvas resulted in updates and visible animation. An animation in the second canvas wouldn't result in repaints.
When we start an animation, we request a redraw on all windows and return with
Winit then schedules an animation frame request, and in the callback the redraw request events are delivered. For the first window we call
update_animations(), a new tick is detected (different than the previous one) and animated properties are dirty and yield new windows.
Then right away we get called again with a redraw request for the second window. update_animations() determines that the instant::now() is the same, and has_animations() returns false. So at the end of the event handler we return fail to return
Polland therefore no animation frame request is created, which means the animations just stop.
Fix this by calling update_animations() only once, when all input events have been processed and the redraw events are up for delivery next.
This is visible in the preview canvases in the documentation, if a canvas other than the first has animations.
- MCU: fix text being cut in the printer demo sometimes being cut off (#1083)
42 patches were committed by 4 authors.