- ElementHandle::match_descendants() becomes ElementHandle::query_descendants() to emphasize that this creates a query.
- Added ElementQuery::from_root() to remove the need to use the ElementRoot trait.
When reading, create the local equivalent of a dataclass, so that access
doesn't require ["foo"] key syntax.
Also implement the copy protocol, so that we can safely make clones of
the references returned by the ListModel.
The property editor built into the live-preview now comes with the
concept of a "simple/complex mode". There is a "K" (for complex, obviously;-)
or a "S" (for simple, just as obvious) beween the property name and property
value. you can click on the letter to switch from simple to complex mode,
but you can only switch back to simple mode if there are no complex expressions
in the line edit.
This implements a "simple" mode for bools.
# Todo
* [ ] Find icons for simple/complex mode:-)
* [ ] Figure out how to decide whether other types are "simple"
* [ ] Define more UIs for simple types
live-preview: Move simple property code into rust
... and handle simple strings in addition to bool.
The Zephyr VERSION file is excluded as this simply specifies the version
of the Zephyr applicaiton, and the documentation doesn't say how
comments should be specified or if they are supported.
The software renderer now provides a list of regions which have
changed. Convert the regions to big-endian and render them
individually to prevent the non-dirty regions from being converted
away from big-endian. Unfortunately, this still means we convert any
intersection between region more than once but this will be tackled as
a follow-up commit, as in principle this affects more than just the
Zephyr demo.
The native simulator uses the SDL display driver. In Zephyr v3.6.0 this
driver incorrectly mixes pitch and width in asserts, causing the
application to assert when run. This revision fixes the assert. Ideally
we would use a tagged release, but there is not one available yet.
Zephyr reports that the RK055HDMIPI4MA0 MIPI display is using
PIXEL_FORMAT_BGR_565.
The buffer we provide to Slint uses `slint::platform::Rgb565Pixel`.
Somewhere, the pixel data ends up in the correct format to display on
the test hardware.
Setup the printerdemo_mcu example to build and run on the NXP
MIMXRT1170-EVKB.
There is an issue with the supported pixel formats, which will be
resolved in a future commit
Make sure we sleep, even if there are animations. Previously we would
spin the event loop forever once an animation started.
Ideally we need some slint API to get the duration until the next
animation tick.
Define a simple callback to handle touch events from Zephyr. We expect
an input_sdl_touch device to exist in the device tree. This is a fairly
simple implementation as a proof of concept.
The default behaviour of Zephyr (as configured) is to handle inputs in a
separate thread. Each `input_event` describes a specific change, with the
`sync` member specifying when the event has reached a stable state. We
use slint::invoke_from_event_loop to dispatch the slint event in the
main thread.
Add a variant of the printerdemo_mcu that works with Zephyr. For now
we only target the native_sim, and only have rendering set up. Future
commits will add touch support, and investigate synchronization
issues.