For the backend selector, this means that when a backend is selected explicitly,
and initialization fails, don't try `create_default_backend()` but
propagate the error.
For the Rust code generator, propagate the first ensure_backend()
errors. Any subsequent onces (unlikely, since the first thing any
public new() calls is ensure_backend) will unwrap.
Following the winit 0.29 merge, a few adjustments are in order:
- Make slint::Window.set_size() before show keep the size
- on wasm, attempt to keep the size of the canvas from CSS
- on wasm, one must set the width and height explicitly on the canvas
otherwise there is wierd scaling
- on wasm, we can't set None as maximum or minimum size otherwise winit
panics
- It seems that the hack we had to keep the size in range is no longer
necessary
- The hack in the slide puzzle can be removed. (but unfortunately it
doesn't follow resizes
Unfortunatelly we always call set_inner_size to avoid infinite loop when
the css properties are not specificed, so this will override layouts
Also we don't default anymore to the preferred size
* Update internal/backends/winit/winitwindowadapter.rs
Silence this warning:
```
warning: i-slint-backend-qt@1.3.0: qt_window.rs:1536:17: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute [-Wunused-value]
```
This reverts commit 5879e1ec71.
We will update to next version of winit:
Closes#2424
Conflicts:
internal/backends/winit/Cargo.toml
internal/backends/winit/event_loop.rs
internal/backends/winit/glwindow.rs
internal/renderers/skia/Cargo.toml
Pass around a factory function to create the renderer,
instead of a factory function that creates the window adapter. The adapter is
always the same anyway, and this way the WinitWindowAdapter's new
also doesn't have to be generic.
This also prepares for adding a second skia renderer
constructor later to select a specific variant.
Sometimes Radon drivers report on Windows erroneously that it supports
GL_NV_framebuffer_blit as extension but when looking up
glBlitFramebufferNV via getProcAddress it returns a null pointer.
The issue goes away when bumping the GLES version. GLES 2.0 was released
in 2003 and 3.0 in 2012. Practically everyone supports it nowadays (even
Safari), so that's the easiest solution for the Skia renderer.
In `ItemRc::find_sibling` we currently do:
1. get the range
2. check that the next index is within the range
3. call `get_subtree`
The problem is that get_subtree itselg will call 'ensure_updated' which
will do the relayout of the ListView and may get a different range of
element.
So don't query the range before and just have get_subtree to return an
empty ItemWeak if we are out of the actual range.
Couldn't really find a way to make a test since this is called from
the accessibility code which is hard to test as is
For #3700
Parents surch as Opacity, Clip, and co, used to steal the x and y
property of their children, making the property not what they ought to
be.
Now that we refactored recently the code so that geometry need not to be
always linked to a property of the same name, we can dissociate the x
and y property of these generated elements and their content so that the
actual "x" property of the former elementstay some value, despite its
relative item property is now 0.
Had to change a bit of code that was still assuming a literal "height"
or "width" or "y" or "x" property that no longer worked when the
geometry is dissociated from its property
Fix#1072
... and use it to hide internal functionality so users will notice that
they depend on fucntionality we do not provide any guarantees for.
Make the lsp and viewer request the internal feature when building the
interpreter.
We use esbuild to transform index.ts into index.js, but we also need to
perform a type check. esbuild doesn't do that, this is left to the
typescript compiler. So let's run it with -noEmit as recommended by the
esbuild folks, in debug builds as well as in the CI (which doesn't do
debug builds).
Clean the highlight pass so that it is in the same form as the paths
stored in the interpreter. Otherwise they do not match and highlighting
will fail.
Using ESM modules causes issues with the web extension: It complains
about use of "ImportScript" in a module. Something adds that into the
module, I need to properly investigate what and why. Let's revert this
till then.
This reverts commit cb66bc1650.