Simon Hausmann
a98d4709be
Move printer demo and energy-monitor into new top-level demos/ folder
...
These are showing off use-cases for Slint, but they're not examples showing individual Slint features.
Also removed the old printerdemo while at it.
2024-10-25 12:09:32 +02:00
Simon Hausmann
acafc9c3e6
Add default value to the docs of accessible-enabled
.
2024-10-25 10:20:09 +02:00
DataTriny
2de3b9d455
Add the accessible-enabled
property
2024-10-25 10:20:09 +02:00
Update Translations Bot
129936a7d7
Update Translations: extract strings
2024-10-25 03:10:22 +00:00
FloVanGH
181739d624
node: add tests for color set ( #6646 )
2024-10-24 17:45:27 +00:00
FloVanGH
de67a6d201
checkbox: fixed min-height on all styles ( #6647 )
2024-10-24 16:59:18 +00:00
FloVanGH
b874adbc1c
material: fixed button touch area ( #6645 )
2024-10-24 16:25:59 +00:00
Simon Hausmann
cbe77cc14b
Fix lsp macos binary build for nightly snapshot
...
Amends 18db3210d6
2024-10-24 18:20:50 +02:00
Simon Hausmann
512fcedf9c
Fix python setup also on macOS-13 machines
...
Looks like python was upgraded there, too.
Amends 18db3210d6
2024-10-24 17:52:27 +02:00
FloVanGH
69bb6462c3
checkbox: remove margins for fluent and cupertino ( #6639 )
2024-10-24 11:17:37 +00:00
Olivier Goffart
716b31e6c8
Use PopupClosePolicy enum from the type register instead of re-creating it
2024-10-24 13:11:11 +02:00
FloVanGH
3984ab6a7a
gallery: fixed layout of list view page ( #6638 )
2024-10-24 09:28:09 +00:00
FloVanGH
14c7910d49
PopupWindow: added close-policy property ( #6614 )
...
* Update api/cpp/include/slint_window.h
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update docs/reference/src/language/builtins/elements.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/core/window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/eval.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/backends/qt/qt_window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/dynamic_item_tree.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/compiler/passes/materialize_fake_properties.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-10-24 09:27:39 +00:00
Simon Hausmann
0bf924cf0d
Bump FemtoVG to 0.10.1 release that fixes scissor clip problem
2024-10-24 10:30:12 +02:00
Simon Hausmann
e8127ce6ad
Temporarily downgrade FemtoVG version
...
0.10.0 introduced a regression with clipping, that's visible when
running the printer demo (or previewing anything in the vs code
extension).
2024-10-24 08:55:18 +02:00
Olivier Goffart
9e2576bc5c
swrenderer: Small fixup in distance field
...
- include the ' ' char that doesn't have a bounding box but need to be
included for the advance_x
- Fix an off by one in rendering where the last pixel was missing
2024-10-24 08:12:13 +02:00
Simon Hausmann
094a8ea718
Add missing par_iter() call
...
Amends 08c3f7a79a
2024-10-23 19:42:35 +02:00
Simon Hausmann
08c3f7a79a
Fix order of glyphs in BitmapFont's glyphs when using SDFs
...
Initially the character map is ordered by glyph index. Maintain that order for glyph embedding, so that we can safely collect() the bitmaps. Just before creating the final BitmapFont data structure, sort by code point for fast lookups at run-time.
2024-10-23 19:36:51 +02:00
Simon Hausmann
7e3747041f
Fix simulator build
...
Amends ac9b85049a
2024-10-23 19:18:57 +02:00
Milian Wolff
998de63e17
Only clone the public properties for the exported component ( #6633 )
...
Copying potentially thousands of properties for no reason is something
that can be easily optimized away to save a bit of time:
Before:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 1.108 s ± 0.015 s [User: 0.792 s, System: 0.231 s]
Range (min … max): 1.085 s … 1.133 s 10 runs
```
After:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 1.082 s ± 0.019 s [User: 0.773 s, System: 0.214 s]
Range (min … max): 1.054 s … 1.117 s 10 runs
```
2024-10-23 17:05:19 +02:00
Olivier Goffart
cbc28b1f1b
Android: handle properly the Destroy event
...
Destroy means we need to exit the event loop.
And android_main will be called again from another thread, so we need to
support reseting the proxy
There is also a bug in the timer when exiting the app that this worked
around
Fix #6626
2024-10-23 14:30:55 +02:00
Simon Hausmann
a2eacd77f4
Minor cleanup: femtovg -> FemtoVG
2024-10-23 13:25:05 +02:00
Simon Hausmann
df55e5563b
Simplify OpenGL examples to use platform builder API to enforce a GL supported renderer
2024-10-23 11:22:17 +02:00
Ian Hattendorf
687e4ce95b
PlatformBuilder::build() impl requires winit feature
2024-10-23 11:13:49 +02:00
Ian Hattendorf
e2c9b4a743
Fix wording in SlintRenderer comment
...
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2024-10-23 11:13:49 +02:00
Ian Hattendorf
3cc44dc670
Add version to OpenGLAPI
2024-10-23 11:13:49 +02:00
Ian Hattendorf
97927ccee9
Don't allow fallback in PlatformBuilder
...
If we're explicitly requesting a platform with specific properties, we
should fail to allow the caller to react accordingly.
2024-10-23 11:13:49 +02:00
Ian Hattendorf
dedd396093
Allow choosing renderer via PlatformBuilder
2024-10-23 11:13:49 +02:00
Ian Hattendorf
ac9b85049a
Add PlatformBuilder API to allow selecting OpenGL API
...
Right now this just allows selecting between OpenGL and OpenGL ES.
2024-10-23 11:13:49 +02:00
Simon Hausmann
18db3210d6
Pin Python version for Skia builds on macOS
...
The Python version installed on the GH runners via homebrew removes the pipes module, which the Skia build needs until https://github.com/slint-ui/slint/issues/6615 is fixed.
2024-10-23 10:26:59 +02:00
Simon Hausmann
2a4024fdcb
Bump various dependencies
2024-10-23 10:06:12 +02:00
Simon Hausmann
0ebcbbecbe
Speed up SDF generation
...
Using Rayon shaves off ~10% off of gallery.slint on my M3.
2024-10-23 09:12:30 +02:00
Olivier Goffart
d8ab4e4600
Signed DistanceField font rendering in swrenderer
...
Note that this is still disabled in the compiler with no way to enable
it with public API
2024-10-23 09:12:30 +02:00
Simon Hausmann
0e404c835c
Fix warnings about unused fields in glyph embedding
...
Make them always used by centralizing the design metrics reading code.
2024-10-23 09:12:30 +02:00
Simon Hausmann
241eb35a2d
Fix compiler warning about unused function
2024-10-23 09:12:30 +02:00
Simon Hausmann
557729320f
Blind attempt at fixing the sdf sizes
...
Scale the bounding box to the desired target pixel size and use the full range of the bitmap we have for the distances.
2024-10-23 09:12:30 +02:00
Simon Hausmann
a1231f1826
Fix panic when emojis appear in the font
...
For now, generate empyt bitmap glyphs instead of causing a panic.
2024-10-23 09:12:30 +02:00
Simon Hausmann
7b94b58a63
Don't generate glyph bitmaps for characters not present in any font
2024-10-23 09:12:30 +02:00
Simon Hausmann
18f645f814
WIP: Being adding support for generating SDF glyphs
2024-10-23 09:12:30 +02:00
wu bobo
a590883a48
Fixes for older Android versions (6.0 to 9.0) ( #6622 )
...
Fixes #4936
ChangeLog: Support older android
2024-10-22 22:26:35 +02:00
Olivier Goffart
f94a8d07ba
uefi-demo: update dependencies
...
Also disable the compilation if not targetting uefi to avoid error about
duplicated panic handler in rust analyzer
2024-10-22 18:23:26 +02:00
Milian Wolff
e3741a87f6
Only build the RTTI hashmap once per thread ( #6617 )
...
This removes a lot of temporary allocations, note e.g. how this
was called once per component previously yet the data contained
in the map was always the same!
Before:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 636.2 ms ± 20.0 ms [User: 563.4 ms, System: 71.8 ms]
Range (min … max): 615.2 ms … 657.9 ms 10 runs
allocations: 3371939
```
After:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 600.6 ms ± 2.9 ms [User: 522.0 ms, System: 74.4 ms]
Range (min … max): 596.3 ms … 605.2 ms 10 runs
allocations: 2917930
```
2024-10-22 18:01:33 +02:00
Tobias Hunger
10de1e664b
live-preview: Default to "native" as expected (if that is available!)
2024-10-22 14:50:41 +02:00
DataTriny
28b5a67583
Implement accessible-delegate-focus
for the AccessKit backend
2024-10-22 12:54:00 +02:00
Olivier Goffart
6717e627a1
Fix panic when a layout constraint has an Expression::Invalid as binding
...
We can detect this case earlier
Fix #6590
2024-10-22 09:35:57 +02:00
Olivier Goffart
6c81d5069e
Fix parsing of unfinished import
statement
...
Fix #6588
Note for the test: parse error at the end of the file are actually
reported at offset 0. Use a trick to add more `^` at the beginning to
mean that.
(Offset 0 is actually offset 1 as the column starts at 1)
2024-10-22 09:35:46 +02:00
Olivier Goffart
4e50fbdb15
Fix panic making an alias to a private property
...
Fixes #6587
2024-10-22 09:35:31 +02:00
Olivier Goffart
ff53791ce7
Support for changed callback in global
...
Fixes #6599
ChangeLog: Support property changed callbacks in globals
2024-10-22 09:26:48 +02:00
FloVanGH
25607a9706
fluent: fixed foreground of switch ( #6613 )
...
* fluent: formatting
* fluent: fixed foreground color of Switch
2024-10-22 07:24:18 +00:00
Tobias Hunger
7f8da7bf28
compiler: Do not fail the embed_images pass with URLs
...
Slintpad uses URLs to images. Do not fail when we "embed"
those so that we find the list of resources on the Documents
later.
This fixes image loading in slintpad again.
2024-10-21 15:00:55 +02:00