In previous version, we were setting the constraint with wasm after
the window was shown, but this is no longer the case because we delay
the window creation by an iteration of the event loop.
Now should apply the constraint before showing the window.
But on wasm, we also must manually enforce these constraint because the
size given to the WindowBuilder is not applied
The AboutSlint text has a forced linebreak in it, which becomes a box
glyph on MCUs when the font on the host system doesn't use an empty
glyph but a box glyph for \n.
This patch explicitly excludes glyph clusters from text fragments that
feed into lines that originate from one of the three valid separators:
ascii newline, unicode paragraph and unicode line separators.
- We must first set change the constraints before changing the size
otherwise the new size might not be in the old constraint and the
change might not take effect.
- We must update the WindowItem's size even if the size of the window
doesn't change. This happens when a component is set on a window that
that doesn't change it size (eg, preview) but for which we need to
set the geometry on the window
When opting into the Skia renderer, we default to metal on macOS and D3D on Windows.
However if you want to develop a cross-platform application with Skia and
for example rely on OpenGL to be able to implement an OpenGL underlay or overlay,
then we need the ability to explicitly opt into skia's GL renderer.
cc #1445
This way we don't have to add defmt, esp32-println and others as features to corelib and the slint api crate
(which would also expose them as public dependencies),
but instead this can be simply delegated to the Platform trait.
Implment a command in the LSP that can be used to query all known
properties, where those are declared and defined.
With this information we should be able to provide an property editor in
IDEs.
Make the previous patch typesafe by enabling the "proposed" feature in
the `lsp-types` crate, so that the `InitializeResult` has the
`offsetEncoding` field.
Fix the fallout of this change.
Make the LS respond with this data:
```lua
{
capabilities = { ... server_capabilities ... },
offsetEncoding = "utf-8",
serverInfo = {
name = "slint-lsp",
version = "0.2.6"
}
}
```
This forces `characters` in the protocol to be byte-offsets into utf-8 encoded
strings and provides some information about this server that is nice to
have.
And add a test in the CI that checks for warnings in the internal
crates
(Also changed --exlcude in the test to be matching the one from build,
since c++ test are tested separately)
We used to have SLINT_FEATURE_BACKEND_GL_ALL, but when we introduced the
renderer and event loop distinction in the features, we removed the "all" suffix from
the event loop that includes x11 and wayland support.
Similar to commit 957186acb7 we need to take the blur into account in the box shadow image:
We add blur margins around the entire image, but we also need to start drawing at (blur, blur) instead of (0, 0).
The same offset needs to be subtracted again when drawing the cached image.