The first inlining pass should inline any element that has children.
Row is going to be optimized out before the second inlining pass.
In that pass, we shouldn't care if there is no children while inlining
in a `@children`
Fixes#7284
The cargo manifest path differs between the invocation of build.rs and rustc when compiling included_library.rs. Accomodate this by providing relative paths.
When the build script runs within a sandbox, all files are symlinked. So checking for say widgets/fluent/button.slint to be a file with is_file() fails, because it's a symlink. Use !is_dir() instead.
It said `Cannot override property 'background'` because color is defined
as below
```slint
property <color> color <=> background;
```
For the warning, the name should not be resolved.
Fixes#6324
Make it possible to programatically to switch to full-screen mode
via a new property in the Windows item.
The SLINT_FULLSCREEN environment variable will default set this
property to true. However settings this property in the slint code
will override the SLINT_FULLSCREEN.
Fixes#6665
- Rename `accessible-selectable` and `accessible-selected` to `accessible-item-{selectable,selected}`.
Because the property is for items in list rather than eg Text
- Rename `accessible-position-in-set` to `accessible-item-index`.
- Rename `accessible-size-of-set` to `accessible-item-count` and move
the property to the container element rather than the item itself
To keep compatibility with existing Slint code
Commit 53e79000a4 added a call to
LayoutConstraints::new which is shown to produce error in the crater
run.
Previous attempt which included changing `lookup_type_for_child_element`
to check for `is_internal` failed because internal types shouldn't be
enabled in experimental mode, actually
We already have a function that removes the experimental types from the
TypeRegister, so do the same for MenuBar
* WIP: swrenderer: use fixed point for the pixmap font coordinate
* swrenderer: signed distance field: move the glyph to the middle
* swrenderer: round the advance instead of truncating it in distance field
* swrenderer: actually align the gplyph on the sub-pixel precision
sub-pixel within the source.
* swrenderer: adapt the threshold for signed distance field
sqrt(2) is the distance to the diagonal, seems like this gives sharper fonts
* Fix bug in the elision, and re-upload the screenshort
the screenshot changed because the afvanced is now rounded intead of
truncated
The idea of the live-preview is that it never causes disk
access itself, the LSP side handles all that for it.
With this in mind:
* Keep source code of invalidated files in the cache. This
way we will see whether we need to refresh the UI after the
LSP has read the data back from disk. This avoids quite
a bit of rerendering just because an unchanged buffer was
closed in the editor (e.g. because the editor switched buffers!)
* Always return `Some` from our file open fallback so that the
compiler does not fall back to reading data from disk
* Do not try to render if the main file has no source code yet.
The LSP will tell us about the sources in time
If the `image-url()` expression of an `Image { source: @image-url("large-image.png"); ... }` gets inlined into geometry getters and other places that are called for every frame, then we might end up decoding images every frame, if the image isn't in the 5MB image decoder cache. It's better to rely on the `property <image>` of the `Image` for caching the decoded image, so don't inline those.
This fixes CPU being time being spent constantly on decoding images on the home automation lock screen.