The struct held provides access to the design metrics of the font scaled
to the font pixel size used by the element.
ChangeLog: Slint Language: Added font-metrics property to `Text` and `TextInput`.
Closes#6047
This is useful when the UI shows for example labels that appear and the screenshot for referenceing is meant to be taken when the opacity animation is complete and the value is (near) 1.0.
I am getting this warning:
```
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
warning: missing documentation for a function
--> internal/backends/winit/lib.rs:83:1
|
83 | / pub fn create_gl_window_with_canvas_id(
84 | | canvas_id: &str,
85 | | ) -> Result<Rc<dyn WindowAdapter>, PlatformError> {
| |_________________________________________________^
|
note: the lint level is defined here
--> internal/backends/winit/lib.rs:6:9
|
6 | #![warn(missing_docs)]
| ^^^^^^^^^^^^
```
Fix this by adding a tiny bit of documentation
We observe, in issue #5699 that the call to `AndroidAppWaker::wake`
doesn't always result in a `PollEvent::Wake` event.
So to work around that, always process event from any event we recieve
so that any timeout or input event would make sure event gets processed.
Closes#5699
Combining an EGL config with EGL_ALPHA_SIZE == 8 with an Xrgb8888 surface yields a bad match on eglCreateWindowSurface.
That's fair, and we should accomodate for that by avoiding such EGL configs.
This is a workaround for the compositor on WSL tending to crash.
Unfortunately we can't just try to create an event loop with x11 first
and then re-try with wayland, winit doesn't allow that. So just avoid
wayland for now.
The long term solution #5667Fixes#5657
- 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.
It doesn't compile:
```
Dex conversion failed: Error in ...\out\java\dev\slint\android-activity\SlintAndroidJavaHelper$1.class:
java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null
```
I don't know how to solve the error, but i can giv an informative
message telling them to downgrade Java
CC: #4973
This could've been `set_opengl_context` taking an `Option`, but it turns
out that makes for an awkward interface when wanting to pass None,
because that also then requires a dummy type for the OpenGL context even
though none is wanted.
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
* Add winit window event filter (#3066)
* Winit window event filter changelog entry
* Format fixes
* More format fixes
* Make requested changes
- Callback gets a ref to the Slint window
- Callback returns an enum
- Callback is no longer `Send`
* Format fixes
* More format fixes
* Merge conflict fixes
* Rename members of `WinitWindowEventResult`
Closes#3066