Popups may have normal `Item`s as parrent, while all the other
components always have a `DynamicTree` as a parent. So do not
panic when some component ends up with an `Item` as a parent.
Just return `None` instead of panicing.
We probably need to make the focus-handling more aware of
popups eventually, but this stops the panics.
Fixes: #5826, #5830
(eg: alt+tab or control+tab)
Failed attempt at fixing #5823
This doesn't fixes it because the problem is that the key event are
forwareded as syntetic events when we gain focus, and they are not in a
order that allow to detect alt+tab
Document the two constraints of using Tokio futures in Slint, and how to work around them.
Fixes#5733
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
Deriving strum::EnumIter on a publicly exposed enum (like PointerEventButton) implies visibility into types that strum declares. This was added just for testing
in systest and can be solved differently.
Amends a1857e6154
On Wayland hiding a window requires destroying the surface, which
means destroying the winit window as well as the underlying graphics
surface. The latter is tricky as we have to keep the renderer around,
as our WindowAdapter trait's `renderer()` function returns a `&dyn
Renderer` and that also has to work without a window (to obtain text
metrics).
Fixes#4225
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
- The cfg_aliases crate does it out of the box already
- Don't create a build.rs for this only purpose when it can be added in
Cargo.toml lints group. (This wasn't possible when the warning was
first introduced in nightly)
When stopping a timer, the removal from the timer list requires a mutable borrow.
If during that borrow the timer's closure is dropped and a `Drop` impl starts another time, then the attempt of
acquiring a mutable borrow for the timers list to insert the new timer fails.
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
This change exposes functionality of already existing internal API
that all renderers use to obtain pixels for upload to the screen - so
it's rather well tested.
This also exposes the `SharedImageBuffer` API, an enum that represents
different SharedPixelBuffer encodings.
Fixes#5023
* Implemented resizing for non-decorated winit windows
* Fixed formatting
* Changed direction match to use a tuple, reduced resize border size, returned after handling resize
* Added is resizable check for before resizing winit window
* Added resize-border property to window
* Formatted code
* Change resize-border from float to length