Commit graph

15599 commits

Author SHA1 Message Date
Nigel Breslaw
7a22e21534 Update 2025-11-18 15:01:41 +02:00
Nigel Breslaw
94be1c9f05 Update monorepo and api node to node 22LTS 2025-11-18 14:59:20 +02:00
dependabot[bot]
2f90d10f4f
build(deps): bump the npm-patch-updates group with 13 updates (#10104)
* build(deps): bump the npm-patch-updates group with 13 updates

Bumps the npm-patch-updates group with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [html-react-parser](https://github.com/remarkablemark/html-react-parser) | `5.2.8` | `5.2.10` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `19.2.2` | `19.2.6` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `19.2.2` | `19.2.3` |
| [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) | `5.1.0` | `5.1.1` |
| [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.0.8` | `4.0.10` |
| [@lumino/default-theme](https://github.com/jupyterlab/lumino) | `2.1.10` | `2.1.11` |
| [@lumino/widgets](https://github.com/jupyterlab/lumino) | `2.7.1` | `2.7.2` |
| [@astrojs/markdown-remark](https://github.com/withastro/astro/tree/HEAD/packages/markdown/remark) | `6.3.8` | `6.3.9` |
| [@astrojs/mdx](https://github.com/withastro/astro/tree/HEAD/packages/integrations/mdx) | `4.3.10` | `4.3.11` |
| [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.3.4` | `2.3.6` |
| [astro-embed](https://github.com/delucis/astro-embed/tree/HEAD/packages/astro-embed) | `0.9.1` | `0.9.2` |
| [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) | `5.15.6` | `5.15.9` |
| [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) | `9.3.0` | `9.3.2` |


Updates `html-react-parser` from 5.2.8 to 5.2.10
- [Release notes](https://github.com/remarkablemark/html-react-parser/releases)
- [Changelog](https://github.com/remarkablemark/html-react-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/remarkablemark/html-react-parser/compare/v5.2.8...v5.2.10)

Updates `@types/react` from 19.2.2 to 19.2.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 19.2.2 to 19.2.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `@vitejs/plugin-react` from 5.1.0 to 5.1.1
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.1.1/packages/plugin-react)

Updates `vitest` from 4.0.8 to 4.0.10
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.10/packages/vitest)

Updates `@lumino/default-theme` from 2.1.10 to 2.1.11
- [Release notes](https://github.com/jupyterlab/lumino/releases)
- [Changelog](https://github.com/jupyterlab/lumino/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/lumino/compare/@lumino/default-theme@2.1.10...@lumino/default-theme@2.1.11)

Updates `@lumino/widgets` from 2.7.1 to 2.7.2
- [Release notes](https://github.com/jupyterlab/lumino/releases)
- [Changelog](https://github.com/jupyterlab/lumino/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/lumino/compare/@lumino/widgets@2.7.1...@lumino/widgets@2.7.2)

Updates `@astrojs/markdown-remark` from 6.3.8 to 6.3.9
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/markdown/remark/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/@astrojs/markdown-remark@6.3.9/packages/markdown/remark)

Updates `@astrojs/mdx` from 4.3.10 to 4.3.11
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/integrations/mdx/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/@astrojs/mdx@4.3.11/packages/integrations/mdx)

Updates `@biomejs/biome` from 2.3.4 to 2.3.6
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.6/packages/@biomejs/biome)

Updates `astro-embed` from 0.9.1 to 0.9.2
- [Release notes](https://github.com/delucis/astro-embed/releases)
- [Changelog](https://github.com/delucis/astro-embed/blob/main/packages/astro-embed/CHANGELOG.md)
- [Commits](https://github.com/delucis/astro-embed/commits/astro-embed@0.9.2/packages/astro-embed)

Updates `astro` from 5.15.6 to 5.15.9
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.15.9/packages/astro)

Updates `cspell` from 9.3.0 to 9.3.2
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/commits/v9.3.2/packages/cspell)

---
updated-dependencies:
- dependency-name: html-react-parser
  dependency-version: 5.2.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@types/react"
  dependency-version: 19.2.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@types/react-dom"
  dependency-version: 19.2.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 5.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: vitest
  dependency-version: 4.0.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@lumino/default-theme"
  dependency-version: 2.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@lumino/widgets"
  dependency-version: 2.7.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@astrojs/markdown-remark"
  dependency-version: 6.3.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@astrojs/mdx"
  dependency-version: 4.3.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: "@biomejs/biome"
  dependency-version: 2.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: astro-embed
  dependency-version: 0.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: astro
  dependency-version: 5.15.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
- dependency-name: cspell
  dependency-version: 9.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>

* [autofix.ci] apply automated fixes

* Fix glob security alert

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nigel Breslaw <nigel.breslaw@slint.dev>
2025-11-18 14:50:36 +02:00
Burhan Khanzada
1d1a38147d
servo: Make CI use ubuntu runner (#10088)
- Use ubuntu runner for andorid build
- Skip release in android build
2025-11-18 12:45:44 +01:00
Andreas Monitzer
3683cf8798
Android Insets like iOS (#10099)
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
ChangeLog: Implemented Android support to mimic the iOS API.
2025-11-17 16:41:18 +01:00
Olivier Goffart
89aaadfd20 Layout: fix warning about "only has effect on layout elements" when it is actually a layout
When deriving from layout, if there is no extra item, we wouldn't inline
the layout anymore and we would emit warning despite we shouldn't
2025-11-17 16:04:18 +01:00
Tasuku Suzuki
224a06af57
Gallery Example: Add i18n and dynamic font loading for WASM (#9762)
- Bundle translations for WASM/Android only (not for native builds)
- Load Noto Sans CJK fonts dynamically from GitHub at runtime
- Implement register_font_from_memory() with Result<FontHandle, RegisterFontError>
- Make API automatically available with std feature (no explicit feature flag needed)
- Export load_font_from_bytes() for WASM font loading from JavaScript
- Change from wasm_bindgen(start) to explicit main() call for better control

Fonts are loaded before app initialization to ensure proper CJK text
rendering across all major browsers without bundling font files.

Native builds load translations from lang/ directory at runtime.
WASM/Android builds bundle translations at compile time and detect
browser/system language automatically.

API is now available when std feature is enabled, since we always
have fontique with std. No need for experimental-register-font feature.
2025-11-17 14:00:39 +01:00
Olivier Goffart
2de0e5764b Interpreter: Register the popup id in the right instance
The instance containing the popup instead of the current instance

Fixes #10089
2025-11-17 13:20:07 +01:00
Tasuku Suzuki
f0098266f3 mcu-board-support: Remove extraneous line from README
Clean up documentation by removing an extra cargo build command that was incorrectly placed in the STM32U5G9J-DK2 section.
2025-11-17 11:53:09 +01:00
Olivier Goffart
3892551bca C++: Fix binary incompatibility with freestanding 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
`ImageCacheKey` has a different size depending on the feature `std`
which is not reflected by cbindgen. Ensure that it is always the same
for C++ build

Fixes #10077

(Another option would have been to add "frature=std" in
cbindgen::Config::defines, but the problem is that there is no
SLINT_FEATURE_STD (it is SLINT_FEATURE_FREESTANDING and has the opposite
meaning), and because of the order of includes it wouldn't be defined
when then ImageCacheKey struct is declared)
2025-11-17 11:10:40 +01:00
Olivier Goffart
b478a9404f Core: replace the use of WindowAdapterInternal::as_any with trait inheritance
This is now possible since Rust 1.86
2025-11-17 10:31:08 +01:00
Nigel Breslaw
d3b7bb62b1
Fix js-jaml security alert (#10091) 2025-11-17 10:46:14 +02:00
Simon Hausmann
f2579db32b C++: Update to Corrosion 0.6 beta to fix mingw-llvm builds
Replaces #10052
2025-11-17 09:14:47 +01:00
dependabot[bot]
b4f6b9c75c
build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /ui-libraries/material/docs (#10071)
* build(deps-dev): bump js-yaml in /ui-libraries/material/docs

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-17 09:24:58 +02:00
dependabot[bot]
88f1ff39b6
build(deps): bump astro from 5.15.4 to 5.15.6 (#10061)
* build(deps): bump astro from 5.15.4 to 5.15.6

Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 5.15.4 to 5.15.6.
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.15.6/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.15.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-17 09:20:59 +02:00
Simon Hausmann
a5b535aa30 winit: Remove unnecessary OnceCell
Some checks failed
autofix.ci / format_fix (push) Has been cancelled
autofix.ci / lint_typecheck (push) Has been cancelled
autofix.ci / ci (push) Has been cancelled
2025-11-16 07:16:09 +01:00
Simon Hausmann
23eace7a43 wgpu: Fix panic when obtaining current surface texture
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
When calling surface.get_current_text() to obtain the next texture to render into, we need to handle errors. Best attempt is to try again after a timeout, and for the other errors (Outdated, Lost, etc.) just try to re-configure the surface and try again as well.

Fixes #9941
2025-11-15 09:54:07 +01:00
Joshua Goins
2d7d657a30 C++: Denote limitation compiling multiple .slint files in one namespace
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
Coming from the QML world  it was normal to just throw a bunch of QML
files into a single CMake target without any thinking. But with Slint, I
encounter into strange symbol conflict issues and thinking this was a
bug in our compiler.

In reality this was actually an acceptable limitation (see #2909) which
is fine... but this wasn't isn't mentioned anywhere in the CMake
documentation - so I never knew about this or the solution. I added a
new cautionary warning to let future developers know that in case of
symbol conflicts, they need to separate files into their own namespaces.
2025-11-14 20:52:32 +01:00
Joshua Goins
4324c187e9 C++: Fix build generation failing when compiling multiple .slint files
If you try to pass multiple files into slint_target_sources, some
generators may complain with a strange error like this:

ninja: error: build.ninja:226: multiple rules generate slint_generated_dialog_1.cpp

The reason for this was how the macro worked (and CMake scoping rules.)
While putting together the list of .cpp files to generate - which is 1
by default but is user-configurable - we append a list called cpp_num.
However we don't *reset* this list variable, so in each foreach
iteration we kept appending a new .cpp file and thus telling CMake we
were generating "slint_generated_dialog_1.cpp" twice, in addition to
whatever other file you had. We don't hit this issue with the other
variables like translation_domain_prop because they're set on every
iteration.

The fix for this is simple though, we can just set the variable to
empty.
2025-11-14 20:50:34 +01:00
Simon Hausmann
e5a91d0277 winit: Replace as_any() with trait upcasting
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-14 17:49:42 +01:00
Simon Hausmann
e727411002 femtovg: Implement webgl context loss and restore event handling
Handle it gracefully when the browser decides to take away our WebGL context.

Fixes #1088
2025-11-14 17:49:42 +01:00
Olivier Goffart
ba28b73245 Compiler: update to edition 2024 2025-11-14 16:10:46 +01:00
Olivier Goffart
a42fd636d7 Compiler: Reformat with edition 2024 2025-11-14 16:10:46 +01:00
Burhan Khanzada
52ecb84571
CI: Added servo example to main CI workflow (#10067)
* CI: Added servo example to main CI workflow

* CI: Make servo_example job only runs when file chanages in  examples/servo

* CI: Remove permissions
2025-11-14 15:02:21 +01:00
David Faure
ca492faf49 core: fix edition 2024 warnings with slint_debug_property enabled 2025-11-14 14:10:15 +01:00
Burhan Khanzada
a344d50149
servo: Mac and Android CI (#10064)
- Adeed Mac and Android CI
- Ignore exmaples/servo/Cargo.lock license
2025-11-14 13:23:25 +01:00
autofix-ci[bot]
4154f7e1cd [autofix.ci] apply automated fixes
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
2025-11-14 09:58:27 +01:00
Tasuku Suzuki
20e9c29b65 printerdemo_mcu: Make window resizable with minimum dimensions
Replace fixed width/height with min-width/min-height and set preferred dimensions to allow the window to be resized while maintaining a minimum size.
2025-11-14 09:58:27 +01:00
Tasuku Suzuki
f24ad34a03
Add support for CSS conic-gradient 'from <angle>' syntax (#9830)
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
* Add support for CSS conic-gradient 'from <angle>' syntax

Implement rotation support for conic gradients by adding the 'from <angle>'
syntax, which rotates the entire gradient by the specified angle.

- Add `from_angle` field to ConicGradient expression
- Parse 'from <angle>' syntax in compiler (defaults to 0deg when omitted)
- Normalize angles to 0-1 range (0.0 = 0°, 1.0 = 360°)
- Add `ConicGradientBrush::rotated_stops()` method that:
  * Applies rotation by adding from_angle to each stop position
  * Adds boundary stops at 0.0 and 1.0 with interpolated colors
  * Handles stops outside [0, 1] range for boundary interpolation
- Update all renderers (Skia, FemtoVG, Qt, Software) to use rotated_stops()

The rotation is applied at render time by the rotated_stops() method,
which ensures all renderers consistently handle the gradient rotation.

* Add screenshot to rotated conic gradient docs example

Wraps the rotated conic gradient example in CodeSnippetMD to automatically
generate and display a visual screenshot of the gradient rotation effect.
This makes it easier for users to understand how the 'from' parameter rotates
the gradient.

* Make ConicGradientBrush fields private

The from_angle and stops fields don't need to be pub since:
- Rust code in the same module can access them without pub
- C++ FFI access works through cbindgen-generated struct (C++ struct members are public by default)

* Optimize ConicGradientBrush::rotated_stops to avoid allocations

- Changed return type from Vec to SharedVector
- When from_angle is zero, returns a clone of internal SharedVector
  (only increments reference count instead of allocating new Vec)
- Removed break from duplicate position separation loop to handle
  all duplicate pairs, not just the first one
- Updated documentation to match actual implementation

* Remove automatic sorting in ConicGradientBrush::new() to match CSS spec

- CSS conic-gradient does not automatically sort color stops
- Stops are processed in the order specified by the user
- Changed boundary stop interpolation logic to use max_by/min_by
  instead of relying on sorted order
- This allows CSS-style hard transitions when stops are out of order

* Move conic gradient rotation processing to construction time

Major changes:
- ConicGradientBrush::new() now applies rotation and boundary stop
  processing immediately, instead of deferring to rotated_stops()
- Removed rotated_stops() method - backends now use stops() directly
- Changed to LinearGradientBrush pattern: store angle in first dummy stop
- Added angle() method to retrieve the stored angle
- Maintained #[repr(transparent)] by removing from_angle field
- All backends updated: rotated_stops() -> stops()
  - Qt backend
  - Skia renderer
  - femtovg renderer
  - Software renderer

C++ API changes:
- Added FFI function slint_conic_gradient_new() for C++ to call Rust's new()
- Updated make_conic_gradient() to call FFI function instead of manually
  constructing SharedVector
- Ensures C++-created gradients get full rotation processing

Benefits:
- Eliminates per-frame rotation calculations
- Reduces memory usage (no from_angle field)
- Consistent with LinearGradientBrush design
- C++ and Rust APIs now produce identical results

* Change ConicGradientBrush::new() from_angle parameter to use degrees

- Changed from_angle parameter from normalized form (0.0-1.0) to degrees
- Matches LinearGradientBrush API convention (angle in degrees)
- Updated internal conversion: from_angle / 360.0 for normalization
- Stores angle as-is in degrees in the first dummy stop
- FFI function slint_conic_gradient_new() passes degrees directly

Example usage:
  ConicGradientBrush::new(90.0, stops)  // 90 degrees
  LinearGradientBrush::new(90.0, stops) // 90 degrees (consistent)

* Fix ConicGradient color transformation methods to preserve angle

Changed brighter(), darker(), transparentize(), and with_alpha() methods
to clone and modify the gradient in-place instead of calling new().

- Clones the existing gradient (preserves angle and rotation)
- Modifies only color stops (skips first stop which contains angle)
- Avoids re-running expensive rotation processing
- Maintains the original angle information

Before: ConicGradientBrush::new(0.0, ...) // Lost angle information
After:  Clone + modify colors in-place     // Preserves angle

* Use premultiplied alpha interpolation for conic gradient colors

- Changed interpolate_color() to use premultiplied RGBA interpolation
- Updated signature to match Color::mix convention (&Color, factor)
- Added documentation explaining why we can't use Color::mix() here
  (Sass algorithm vs CSS gradient color interpolation)
- Reference: https://www.w3.org/TR/css-images-4/#color-interpolation

This ensures correct visual interpolation of semi-transparent colors
in gradient boundaries, following CSS gradient specification.

* Run rustfmt on conic gradient code

* Fix ConicGradientBrush edge cases and add comprehensive tests

- Handle stops that are all below 0.0 or all above 1.0
- Add default transparent gradient when no valid stops remain
- Add 7 unit tests covering basic functionality and edge cases

* Apply clippy suggestion: use retain() instead of filter().collect()

* Fix radial-gradient parsing to allow empty gradients

Allow @radial-gradient(circle) without color stops, fixing syntax test
regression from commit 820ae2b04.

The previous logic required a comma after 'circle', but it should only
error if there's something that is NOT a comma.

* Fix conic-gradient syntax test error markers

Update error markers to match actual compiler error positions.
The 'from 2' case produces two errors:
- One at the @conic-gradient expression level
- One at the literal '2' position

Auto-updated using SLINT_SYNTAX_TEST_UPDATE=1.

* Refactor ConicGradientBrush epsilon adjustment and update tests

- Move epsilon adjustment for first stop into rotation block
  (only needed when rotation is applied)
- Update property_view test to reflect boundary stops added by
  ConicGradientBrush::new()

* Update conic-gradient screenshot reference image

Update the reference screenshot to match the current rendering output.
The small pixel differences (1% different pixels, max color diff 3.46)
are due to minor rounding differences in the conic gradient implementation.

* Fix ConicGradientBrush C++ FFI to avoid C-linkage return type error

Refactored ConicGradientBrush construction to match LinearGradientBrush
pattern, fixing macOS Clang error about returning C++ types from extern "C"
functions.

Changes:
- Rust: Split ConicGradientBrush::new into simple construction + separate
  normalize_stops() and apply_rotation() methods
- Rust: Added FFI functions slint_conic_gradient_normalize_stops() and
  slint_conic_gradient_apply_rotation() that take pointers (no return value)
- C++: Construct SharedVector directly in make_conic_gradient(), then call
  Rust functions via pointer (matching LinearGradientBrush pattern)
- Optimized both methods to only copy when changes are needed

This resolves the macOS Clang error:
"'slint_conic_gradient_new' has C-linkage specified, but returns incomplete
type 'ConicGradientBrush' which could be incompatible with C"

The new approach maintains ABI compatibility while keeping complex gradient
processing logic in Rust.

* Fix C++ header generation to avoid GradientStop redefinition error

Resolves the macOS CI compilation error where GradientStop and
ConicGradientBrush were being defined in multiple headers
(slint_color_internal.h, slint_image_internal.h, and slint_brush_internal.h).

Changes:
- cbindgen.rs: Add ConicGradientBrush and FFI functions to slint_brush_internal.h include list
- cbindgen.rs: Add GradientStop, ConicGradientBrush, and FFI functions to exclude list for other headers
- slint_color.h: Add forward declaration for ConicGradientBrush
- slint_color.h: Add friend declaration for ConicGradientBrush to allow access to Color::inner

Root cause: After adding extern "C" functions in graphics/brush.rs,
cbindgen automatically detects and tries to include them in all headers
that use graphics/brush.rs as a source. The exclude list + filter logic
ensures these types only appear in slint_brush_internal.h.

This fixes the C++ compilation errors:
- "redefinition of 'GradientStop'"
- "ConicGradientBrush does not name a type"
- "Color::inner is private within this context"

* Prepare ConicGradientBrush FFI for Rust 2024 edition

Update FFI functions to use the new `#[unsafe(no_mangle)]` attribute
syntax and safe function signatures in preparation for Rust 2024 edition.

- Add `#![allow(unsafe_code)]` to graphics module for `#[unsafe(no_mangle)]`
- Add `#[cfg(feature = "ffi")]` to conditionally compile FFI functions
- Change from raw pointers to safe references (&mut)
- Remove manual null checks and unsafe blocks
2025-11-13 16:05:16 +01:00
Simon Hausmann
be0aea7e8a core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
Simon Hausmann
3216d54aaa core: Switch to edition 2024 and just reformat
Warnings fixed in follow-up commit
2025-11-13 15:59:32 +01:00
Simon Hausmann
8cdbbd7bdc common: switch to 2024
No changes needed, just reformatting.
2025-11-13 15:59:32 +01:00
Simon Hausmann
7e2c4f37af const-field-offset: Switch to edition 2024
(no changes necessary)
2025-11-13 15:59:32 +01:00
Simon Hausmann
a6f94862cf vtable: Upgrade to edition 2024 2025-11-13 15:59:32 +01:00
David Faure
c5a4b99c5f
interpreter: improve "bad type" panic by adding property name (#10047) 2025-11-13 15:55:45 +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