Commit graph

15567 commits

Author SHA1 Message Date
Olivier Goffart
9eec621e65
Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2025-11-25 13:37:45 +01:00
autofix-ci[bot]
f76df71e4d
[autofix.ci] apply automated fixes 2025-11-25 10:01:19 +00:00
Olivier Goffart
a5d8ffd545 Start documenting the processes 2025-11-13 20:24:33 +01:00
Olivier Goffart
453d1bf7cf ChangeLog update 2025-11-13 15:48:43 +01:00
Manuel Plavsic
3668eeca86 Zed extension: Readd the check for slint-lsp to use the binary in PATH 2025-11-13 14:55:45 +01:00
Arnold Loubriat
4e466df420
Invert vertical slider direction (#10002)
Changelog: Inverted vertical slider direction 

Closes https://github.com/slint-ui/slint/issues/9932
2025-11-13 14:51:08 +01:00
Olivier Goffart
1e2c4b5060 LLR: split properties and callback arrays
The idea is that then we can map 1-to-1 with internal array in a
llr-based interpreter
2025-11-13 14:37:36 +01:00
autofix-ci[bot]
be41b91c81 [autofix.ci] apply automated fixes 2025-11-13 14:35:56 +01:00
Tobias Hunger
4dd82bd27a live-preview: Fix context menu on SpreadSheet
It should only pop up when explicitly requested by a
(left) mouse click on the row header.
2025-11-13 14:35:56 +01:00
Tobias Hunger
f716fe2e6d live-preview: Do not uselessly import components 2025-11-13 14:35:56 +01:00
Tobias Hunger
7f4a7fbbeb live-preview: Fix handling of struct and values when setting a tables
Before we assumed that there are either values in an array or structs
with more than one field. Fix that. This is basically the inverse of #9889.
2025-11-13 14:35:56 +01:00
Tobias Hunger
9ac541e4d0 live-preview: Improve handling of structs and arrays in "Simulation Data"
Do not treat structs with one value as simple values in the "Simulation Data" tab.

Arrays of structs were considered too complex and forced into
"JSON mode". That is not necessary, so do not do that.

Closes: #9889
2025-11-13 14:35:56 +01:00
Simon Hausmann
6be68fdc3d parley: Apply clipping to text input rendering
We lay out text for text inputs with text_overflow == Clip, so we should also render it like that.

Fixes #10055
2025-11-13 13:03:24 +01:00
Andreas Monitzer
6e08b62f1d
Virtual Keyboard Handling on iOS (#10020)
On iOS/winit, listen to keyboard show/hide/change notifications and scroll Flickables to keep the element in focus visible. (#9857)
2025-11-13 12:41:29 +01:00
Olivier Goffart
3f12bba817
zed: Fix the name of the slint-lsp binary on windows (#10057)
The .zip file don't contain any subdirectories

Fixes #9869
2025-11-13 12:28:02 +01:00
Murmele
c5c482f548
Checkbox: Add documentation and remove not required function (#10007)
Some checks are pending
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
autofix.ci / format_fix (push) Waiting to run
* Iintialize tristate
* Control the check_box.check_state always using the set_check_state function
Reason: Otherwise the tristate is not handled properly
* Handle tristate directly in checkbox
* fix documentation
2025-11-13 10:24:34 +02:00
Olivier Goffart
e3da256584 LLR: A pass to remove unused properties from the LLR 2025-11-13 08:00:53 +01:00
Olivier Goffart
2edbc970c2 LLR: fix printing of invalid parent reference 2025-11-13 08:00:53 +01:00
Olivier Goffart
b134c08d29 LLR: remove unused parent_context 2025-11-13 08:00:53 +01:00
mccakit
ab398c4038 Update slint_models.h 2025-11-13 06:58:22 +01:00
Tasuku Suzuki
3d53701ffe mcu-board-support: Fix memory.x linker precedence for STM32H735G
Copy board-specific memory.x to OUT_DIR and add it to the linker search path. This ensures the STM32H735G board-specific memory.x takes precedence over any generic memory.x from dependencies like ft5336.

Fixes: #10035
2025-11-13 06:56:05 +01:00
Apollo-Roboto
20108fd74a no need for mut 2025-11-13 06:51:07 +01:00
Apollo-Roboto
e5e265e139 moved imports inside target cfg 2025-11-13 06:51:07 +01:00
Apollo-Roboto
d35e919172 updates with system changes 2025-11-13 06:51:07 +01:00
Apollo-Roboto
0050c4f24d winit muda uses window color scheme 2025-11-13 06:51:07 +01:00
David Faure
5a152c6783 compiler: don't allow the row property in a GridLayout's Row element
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
2025-11-12 21:58:39 +01:00
David Faure
4595f116f4 testing: Modernize layout testcases
I kept seeing distracting warnings when working with these testcases,
and it's better to have good examples when writing new testcases.

I didn't touch the issue_*.slint regression tests, so those will
still be testing the old syntax.
2025-11-12 18:17:24 +01:00
David Faure
3d50bc2f69 testing: Rename testcases to ease debugging
Rename grid to grid_simple, otherwise
    cargo test -p test-driver-interpreter -- test_interpreter_layout_grid
runs multiple tests, no way to run only that one.

Same for nested_grid.slint given that there's a nested_grid_2.slint
2025-11-12 18:17:24 +01:00
David Faure
892d1d3762 testing: Add interpreter test for dialog button order
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
There was no such test yet, and my upcoming changes refactor how
and when this reordering happens.
2025-11-12 17:08:31 +01:00
Ashley
e7ec065a90
Change color type to use f32 values internally (#9820)
* Change Color type to be f32 internally but no other changes

* Add missing clamp

* Add round function as we're not on MSRV 1.90+

* Prepare for being able to switch between u8s and f32s

* [autofix.ci] apply automated fixes

* Fix Display impl

* Add feature flag for 8-bit color values. Name to be bikeshed

* Fix brighter-darker test

* Update test screenshot

* Remove unused Float trait import

* Add cfg thing for not(cbindgen)

* Change Channel to float in cbindgen

* Change the cpp color type for uint8_t for now

* Opt cpp into 8-bit-color

* Switch feature around

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-13 04:21:14 +13:00
Simon Hausmann
7605850706 ffmpeg: Use newer ffmpeg-next version 2025-11-12 15:49:54 +01:00
Simon Hausmann
a7f8717f53 testing: Permit tests to override the detected operating system
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2025-11-12 15:25:00 +01:00
Simon Hausmann
72c3e77524 layout: Use existing API to query operating system
This will get the order right for WASM builds :)

Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2025-11-12 15:25:00 +01:00
Olivier Goffart
535a5b5dc3 LLR: don't use LocalMemberReference to initialize property binding
Because they could be aliases to global
2025-11-12 12:07:23 +01:00
Olivier Goffart
5b5838971e LLR: Split the EvaluationContext and the EvaluationScope
The idea is that we want to be able to get a scope without borrowing the
llr::Compilation unit so we can have mutable borrow to the compilation
unit
2025-11-12 12:07:23 +01:00
Olivier Goffart
8b853b255e LLR: rename PropertyReference -> MemberReference
As this goes for property, function, callback
2025-11-12 12:07:23 +01:00
Olivier Goffart
5dc1e106c9 LLR: Simplify member access
In preparation to have callback and properties in different vector
2025-11-12 12:07:23 +01:00
Ionuc Michnea
a659f96899 winit: Mark zero-size Windows windows as occluded
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
2025-11-12 10:23:38 +02:00
Simon Hausmann
ea0d0be032 slint-compiler: Fix fallback family handling for glyph embedding on Linux
Some checks are pending
autofix.ci / ci (push) Blocked by required conditions
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / format_fix (push) Waiting to run
For macOS and Windows we've had hard-coded fallbacks, but none for Linux
after the fontconfig removal. So go through the same fallback families
as when using fontique regularly, and add emoji as parley tries that
within.

This fixes picking up glyphs such as "←→↵⌫".
2025-11-11 18:49:59 +01:00
Olivier Goffart
6b3ea3d7cc Fix font familly of component that inherit from PopupWindow with the material style
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
Fixes #9866

The material style defines a `StyleMetrics.default-font-family` which is
meant to be applied to `Window` element if not set by the user.
But it was mistakely sometimes applied to PopupWindow

Consider this code:
```slint
component MyPopup inherits PopupWindow {
    Text { text: "Hello"; }
}

export component MainWindow inherits Window {
    my_popup := MyPopup { }
}
```

First, we would process MyPopup: `apply_default_property_from_style`
wouldn't do anything, but the `lower_popups` pass would replace its
root with a Window builtin.
Second, we would process MainWindow: `apply_default_property_from_style`
would see that my_popup is using the Window as a builtin and would apply
default window properties from style, which it shouldn't.

In fact, `apply_default_property_from_style` should only apply default
for elements that are directly using the builtin, not a component that
inherits from that builtin, as these property should have been already
set.
2025-11-11 17:17:54 +01:00
Simon Hausmann
ce4283e802 winit: Fix explicit renderer-femtovg-wgpu selection
When no graphics API is requested by the app, permit the selection to continue.
2025-11-11 16:50:58 +01:00
Tobias Hunger
499a8a75e9 vscode: Fix biome linter error in VSCode ectension
Biome was raising this error:

> A "floating" Promise was found, meaning it is not properly handled and
> could lead to ignored errors or unexpected behavior.

Biome is of course right, so handle errors by logging them.
2025-11-11 14:21:18 +01:00
Murmele
db6f436f48
ModalNavigationDrawer: add possibility to react on selection changes of group and item simultaneously (#10008)
* ModalNavigationDrawer: add possibility to react on selection changes of group and item simultaneously like in NavigationDrawer

* Add arguments and their description to the documentation

* align style
2025-11-11 11:20:48 +02:00
Simon Hausmann
e7313dd239 Skia: Update to the latest version of the Rust bindings
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
For details, see https://github.com/rust-skia/rust-skia/releases/tag/0.90.0
2025-11-11 09:22:17 +01:00
Olivier Goffart
2de069cd44 Revert "skia: Fix build after read-fonts release"
This reverts commit 5923fe4cd4.

The bug was fixed upstream
2025-11-11 08:46:01 +01:00
Simon Hausmann
a4ca03b616 Revert "CI: Fix node build"
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
This reverts commit de904ea4c3.

The bug is fixed in a newer napi-build version.
2025-11-10 23:30:00 +01:00
Olivier Goffart
14ff32942c Fix unsoundess in ChangeTracker
Make sure to annotate the function with `'static` or it is possible that
the handler runs closure that reference dead objects
2025-11-10 17:51:23 +01:00
dependabot[bot]
b432ea416f
build(deps): bump the npm-minor-updates group across 1 directory with 3 updates (#10018)
Some checks are pending
autofix.ci / ci (push) Blocked by required conditions
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
Bumps the npm-minor-updates group with 3 updates in the / directory: [esbuild](https://github.com/evanw/esbuild), [unpic](https://github.com/ascorbic/unpic) and [tailwind-merge](https://github.com/dcastil/tailwind-merge).


Updates `esbuild` from 0.25.12 to 0.27.0
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.12...v0.27.0)

Updates `unpic` from 4.1.3 to 4.2.2
- [Release notes](https://github.com/ascorbic/unpic/releases)
- [Changelog](https://github.com/ascorbic/unpic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ascorbic/unpic/commits)

Updates `tailwind-merge` from 3.3.1 to 3.4.0
- [Release notes](https://github.com/dcastil/tailwind-merge/releases)
- [Commits](https://github.com/dcastil/tailwind-merge/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-updates
- dependency-name: unpic
  dependency-version: 4.2.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-updates
- dependency-name: tailwind-merge
  dependency-version: 3.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-10 16:49:23 +02:00
Nigel Breslaw
2c5b402909
Tweak to reduce total number of rust-cache (#10017)
50GB of caches in branches is still being created. This doesn't 
eliminate them all but makes a decent dent. This stops the more useful 
master branch cache being evicted.
2025-11-10 14:46:27 +02:00
Ashley
dfbcbdaed2
Richtext: color handling (#9996)
* Use htmlparser

* Parse color values

* Cargo fmt

* Use imported Color

* Actually handle colors via overrides

* Check that the tags match

* Use color parsing feature

* Make htmlparser optional

* Error handling

* [autofix.ci] apply automated fixes

* debug_log!

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-11 01:05:44 +13:00