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.
The change in https://github.com/slint-ui/slint/pull/6747
invalidated the cache, but it was only reloaded when one of the dependent was reloaded.
We need to reload the cache for all open file so that LSP feature continue to work on
open document even if they get no changes
* creating a lookup table of colors based on the set on apple docs
then selecting from these colors rather than always typing hex
also added an in property for setting selected color (future)
* splitting out method of changing selection colour for later
* forgot to pull CupertinoColors from import
* Squashed commit of the following:
commit 4924aa908d6e039a7bf1f79ede3dc7c26f71007f
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 17:31:45 2024 -0500
use defined Palette for states
commit 80711ee7188f37b1b29ce11855b6a636d7a39306
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 17:29:51 2024 -0500
make control colour consistent with style and other controls
commit 1cfd39e6da6643600e8b553dfab2418c8552cdc4
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 13:58:07 2024 -0500
selection of controls when focused is not current cupertino style and too strong
commit 4bf4ae6ad385e118687f752362b34e079c03fe22
Author: szecket <szecket@magrittescow.com>
Date: Fri Nov 15 13:42:58 2024 -0500
make foreground color contrast when selected
* removing property that is only in cupertino
SmolStr has an Arc internally for large strings. This allows
cheap copies of large strings, but we lose that ability
when we convert the SmolStr to a &str and then reconstruct a
SmolStr from that slice.
I was hoping for some larger gains here, considering the impact
of this code change, but it only removes ~50k allocations,
while the impact on the runtime is not noticeable at all.
Still, I believe this is the right thing to do.
Before:
```
allocations: 2338981
Time (mean ± σ): 988.3 ms ± 17.9 ms [User: 690.2 ms, System: 206.4 ms]
Range (min … max): 956.4 ms … 1016.3 ms 10 runs
```
After:
```
allocations: 2287723
Time (mean ± σ): 989.8 ms ± 23.2 ms [User: 699.2 ms, System: 197.6 ms]
Range (min … max): 945.3 ms … 1021.4 ms 10 runs
```