The Preview delays starting the event loop as much as possible, simply
because our backends may panic/crash when they are not happy with the
UI configuration state they get started in.
So keep this... but use the `sender` in the Cache as an indicator of "we
have a UI". So explicitly set/reset the sender as the UI comes and goes
and do less implicit setup otherwise.
Not sure why, but it fixes that applying the constraints is otherwise
not working with winit on X11
This is not the first time we do this fix:
723f89d342 and 1891e4489a
Commit f24014a2dd made the insert function
private. Let's solve this differently by creating a private WASM
clipboard and invoking copy() and paste() on the Text item instead.
The first attempt was implementing a ClipboardProvider just for the wasm
build, just like with SilentClipboard, but unfortunately that doesn't
work because in the backend's set_clipboard_text()/clipboard_text()
functions, there's no currently running winit event loop that we could
access, becaused the call stack starts directly at the DOM event
handler, not in our winit event handler.
On wayland, we may not be getting a resize event, after issuing `request_inner_size()`.
Without that, we would fail to size the EGL surface correctly.
Centralize all request_inner_size() call sites
and dispatch a "local" resize event if the new size is returned by winit.
Fixes#1671
Both structure are bascially the same and only used internally, no need
to have the two.
The only difference was that one had the modifiers and the other one
not. But we can just set the modifier at the point we were converting
between the two.
Make the size argument to svg::render optional to mean that it is the
default size of the image.
Otherwise, passing None as the size to ImageInner::render_to_buffer
would not render the image which is possible in some backend (eg: the
button image icon with the qt backend)
And if the image is really rendered on an empty because of layouting or
so, we don't need to show a warning anyway.
Fix#3790
This fixes the widget having the right size and sifes some strange
issues I had been wondering about for a while now!
Pass own size to children instead, so that they will always have
matching sizes.
Disable outdated projects that never compiled
But keep the ones that don't compile and are updated in the hope that
they fix it
Also keep the ones that are failling because missing icon because there
was regressions in one of this project (#3823)
Add project from the github network that have stars and have non-trivial
use of slint
Regression noticed in this line:
3f97d98bff/ui/tabs/downloads.slint (L77)
The following used to work:
```slint
import { Button, VerticalBox } from "std-widgets.slint";
export component Demo {
in property <[int]> mods;
VerticalBox {
alignment: start;
for xxx in true ? mods : [] : HorizontalLayout { alignment: center; Button { text: "OK!"; } }
}
}
```
But we fixed array conversion and this caused a regression with empty
array
When creating an npm package, substitute workspace fields, so that the resulting Cargo.toml
can actually be used.
Also added a --git=sha1 option to generate snapshot-friendly
packages that add `git = ...; rev = ...`
for all slint dependencies.
This revers the previously added publish step, this doesn't have to be
in the xtask.