Commit graph

322 commits

Author SHA1 Message Date
Simon Hausmann
00e5f59d9c
Skia: Update to latest release of Rust Skia bindings (#9663)
Some checks are pending
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.88) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
For details, see https://github.com/rust-skia/rust-skia/releases/tag/0.89.0
2025-10-09 09:36:43 +02:00
Olivier Goffart
11208758f0 core: Refactor the partial renderer in its own module 2025-10-08 21:08:37 +02:00
Ashley
e5dd53b6c2
parley: make font_size a PhysicalLength (#9672) 2025-10-09 03:47:03 +13:00
Tobias Hunger
cd50b41965
internal: Cargo + typo fixes (#9665)
* internal: Cargo + typo fixes

No intended change of behavior :-)

* Update internal/core/item_tree.rs

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>

* Update internal/core/item_tree.rs

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>

---------

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-10-08 16:33:07 +02:00
Simon Hausmann
01f510f027 parley: Upgrade to parley and fontique 0.6 2025-10-07 12:47:26 +02:00
Ashley
3894c3f6bb
Parley: Be extra careful about physical<->linear conversions (#9643)
* Be extra careful about physical<->linear conversions in sharedparley

* Change a bunch of functions
2025-10-07 22:34:38 +13:00
Simon Hausmann
9a4924fbbb wgpu: Added support for wgpu 27 with Skia
cc #9605
2025-10-06 19:10:31 +02:00
Simon Hausmann
9d6799d6d4 CI: Fix build with newer objc2 crates
Some checks are pending
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
Several APIs are now stable and produce warnings about unused unsafe blocks.
2025-10-06 09:47:53 +02:00
Simon Hausmann
0910024aeb qt: Use parley for text rendering
cc #9559
2025-10-06 09:10:21 +02:00
Simon Hausmann
d80438ce06
CI: prospective fix for mysterious ci failures
Some checks are pending
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
Don’t try to build Skia from source
2025-10-02 23:56:36 +02:00
Simon Hausmann
5ba8206edb Skia: Use parley for text layout
Some checks are pending
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
cc #9559
2025-10-02 16:50:16 +02:00
Simon Hausmann
329461972e Skia/WGPU: Enable vsync by default
Apply commit ae204bda25 also to the wgpu
surface of the skia renderer.

cc #8693
2025-09-17 11:16:00 +02:00
Ashley
241964d567
Change the Rotate item to a Transform that supports scaling (#9387)
* Add scale method to backends

* Rename Rotate to Transform

* Add scaling to Transform

* Fix tests

* Insert Transform if any of scale-x, scale-y or rotation-angle are set

* Add scaling to child_transform and handle events as a result

* Cargo fmt

* Femtovg clipping

* Fix femotovg clipping

* Add newline to actual_render.scale

* Cargo fmt tools/lsp changes

* Modify docs

* Change type to a float instead of percent and fix defaults

* Add note about software renderer

* Add basic event scaling test
2025-09-15 21:14:33 +12:00
Simon Hausmann
768c895ad4 Upgrade to Rust Skia 0.88
For details, see https://github.com/rust-skia/rust-skia/releases/tag/0.88.0
2025-09-12 11:59:57 +02:00
Simon Hausmann
e5cf52d2ba Skia/WGPU/DX12: Fix crash when resizing window
Some checks are pending
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
Resizing the window may cause a panic in wgpu. DebugView with d3d debug layers enabled yields a more elaborate message:

    IDXGISwapChain::ResizeBuffers: Swapchain cannot be resized unless all outstanding buffer references have been released.

So before resizing, force Skia to submit and flush everything to the CPU level. This isn't optimal - especially since it's cross window - but it seems to work.

Fixes #9320
2025-09-11 19:34:21 +02:00
Ashley
0670cb1dc7
Handle rotating mouse events (#9317)
* Start on touch event rotation work

* [autofix.ci] apply automated fixes

* Use ItemTransform instead.

* [autofix.ci] apply automated fixes

* Use casts to deal with integer Coords on some platforms

* Remove rotation checks

* Transform the exit event as well

* Delete check_rotation pass

* Do casts around transform_point to handle i32 Coords

* Remove errors from rotation syntax test

* Basic event rotation test

Working changes

* Fix clicks on rotated objects

* Add RendererSealed::suppports_transformation for runtime checks

* [autofix.ci] apply automated fixes

* Add a few missing line breaks, only transform events if supported by
renderer

* Improve test

* Remove extra whitespace

* Get absolute-position working

* Ensure map_to_window does the coordinate cast thing.

* Manually test mouse-x and mouse-y, test absolute_position()

* Whitespace stuff again

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-12 00:13:14 +12:00
Simon Hausmann
0bb29cb5c2 wgpu: Improve backend avoidance
- For Skia, also opt out of the WGPU GL backend - we're not attempting to map it to Skia.
- For FemtoVG, avoid GL as well, because it produces artefacts.
2025-08-22 17:26:21 +02:00
Simon Hausmann
4f7bc76f1b skia-wgpu: Avoid the vulkan backend on Windows
... as we don't enable the Vulkan feature by default with skia on Windows, because it's not in the binaries and thus would force everyone to build skia (which is a PITA on Windows).
2025-08-22 17:26:21 +02:00
Simon Hausmann
06765f8214 Skia: Add support for rendering with WGPU
Set up the underlying graphics API with WGPU, render into the queue with
skia, present with WGPU. Opens path to importing wgpu textures, provided
that we synchronize them (i.e. pipeline barriers/transitions if needed).
2025-08-22 17:26:21 +02:00
Simon Hausmann
18740aa826 Fix rem support
After commit e04f028c91, the
default-font-size property on WindowItem isn't set anymore by default,
so BuiltinFunction::GetWindowDefaultFontSize, which reads it, would
return zero.

Instead, delegate to a run-time function where we can fall back to the
default from the renderer.

This patch changes rem.slint to use the newer syntax. The main change to
the test case though is to removal of the explicit default-font-size
property setting, so that we fall back to the value provided by the
renderer. This test relies on being run with the testing backend.

Fixes #8961
2025-08-21 14:29:55 +02:00
Simon Hausmann
fd28676ab6 wgpu: Fall back to software rendering if there are no GPU-backed WGPU adapters
Fixes #9164
2025-08-19 14:57:21 +02:00
Simon Hausmann
933e604830 Skia: Fix text overflow elide handling
Some checks are pending
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.85) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
With Overflow::Elide, handle two cases:
  - When word wrap is disabled, lay out with the given width, set the
    elipsis character on the style
  - When word wrap is enabled, lay out with the given width, don't set
    elipsis on the style, *then* compute the correct number of max
    lines, and re-do the layout - that way the elipsis appears on the
    last line of the multi-line text
2025-08-12 15:46:55 +02:00
Simon Hausmann
bb809f9bc9 Skia: Fix regression in text size calculation
When computing the implicit height of a Text, we call text_size() on the renderer with the previously computed width, which in turns creates a text layout and *should* wrap text according to the width and return the height.

Before #8138, text layouts created with NoWrap were still wrapped and produce a height as if it were wrapped.

After #8138, NoWrap would return a height as if the text were on a single line. Unfortunately, the text_size() call used TextWrap::default() as wrap mode, which is NoWrap. That was previously an accidental no-op, but now isn't. So we need to pass TextWrap::WordWrap to get a reasonable height.

Fixes #9053
2025-08-08 16:26:21 +02:00
Simon Hausmann
8ed0fd327e wgpu: Switch to WGPU 26
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
2025-08-05 17:27:00 +02:00
Tasuku Suzuki
3d7f616dee
Add conic gradient support for all backends (#9021)
Some checks are pending
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
- Implement @conic-gradient(color angle, ...) syntax
- Center is always at rectangle center (no center_x/center_y parameters)
- 0 degrees starts at north (12 o'clock position)
- Support Slint angle units: deg, rad, turn
- Software renderer: Full native implementation
- Qt backend: Native support with angle offset correction
- Skia backend: Native support with angle offset correction
- FemtoVG backend: Fallback to solid color (first gradient stop)


ChangeLog: Added support for `@conic-gradient`

Fixes #3957
2025-08-02 09:14:33 +02:00
Simon Hausmann
957ef614e0 Skia: Fix no-wrap still wrapping text sometimes
Fixes #7080
2025-07-28 11:02:54 +02:00
Olivier Goffart
e04f028c91 Fix default-font-size not working with PopupWindow with the Qt backend
We had code on the window to reset the default-font-size property to the
default from the renderer.
For the Qt backend, the PopupWindow being their own Window, this code
was activated also for the PopupWindow's hidden default-font-size
property, which caused all PopupWindow's font to not follow the
default-font-size

Fixes #8855
2025-07-09 17:08:24 +02:00
Simon Hausmann
3101104f5c Switch from WGPU 24 to WGPU 25
- Use a version of FemtoVG that uses WGPU 25
- Rename the unstable-wgpu-24 feature and wgpu_24 module
- Fetch bevy from a revision on master branch that switches to WGPU 25
- Move the bevy example out of the common workspace: That way users of the repo don't get bevy pulled from git, unless they want to build the bevy example.
2025-07-09 11:30:05 +02:00
Simon Hausmann
a316d741d5 Update to skia-safe 0.87
For details, see https://github.com/rust-skia/rust-skia/releases/tag/0.87.0
2025-06-29 14:27:42 +02:00
Olivier Goffart
526c5da24c Don't use the extended debug of the DisplayHandle in the error message
Keep the error message in one line.
Error such as

```
Error: Error creating OpenGL display (Ok(
    DisplayHandle(
        Wayland(
            WaylandDisplayHandle {
                display: 0x00005641c528e590,
            },
        ),
    ),
)) with glutin: not found
```

Are not easy to parse because of all the new lines
2025-06-25 15:06:21 +02:00
Simon Hausmann
4cb6d12119 Initial support for Windows ARM64 binaries
Python is missing, otherwise this builds windows arm64 binaries for the
tools, C++ packages, slint-compiler, npm binaries, and lsp binaries for
the VS code extension.
2025-06-17 09:59:50 +02:00
Olivier Goffart
c0cac46009 Add --generate-link-to-definition in the docs of all our published crate
This is a nice nightly rustdoc feature and we should make use of it
2025-06-06 21:47:36 +02:00
Simon Hausmann
23fdf02d48 Skia: Bump ash and vulkano dependencies 2025-06-04 07:04:13 +00:00
Simon Hausmann
fe599db81c Update to skia-safe 0.86
This version syncs with Skia's milestone 137. See also
https://github.com/rust-skia/rust-skia/releases/tag/0.86.0

Most relevant for us, this version compiles again with the latest cc
crate when cross-compiling.

Fixes #6875
2025-05-26 18:33:21 +02:00
Simon Hausmann
bd0a486da8 Clean up cfgs for Apple operating systems
Replace ios specific cfgs with "apple but not macOS", dubbed
ios_and_friends, so that we also cover iPadOS, etc.. What those have in
common is that they don't have user-resizable windows. (We might want to
add visionOs in the future)

Also, simplify a few macos or ios cfgs with just target_vendor =
"apple", for what applies to all the operating systems.
2025-05-09 20:54:47 +02:00
Simon Hausmann
94b257bdd4 Skia: Delegate texture import to the surface trait
This makes it easier to keep cfg'ed code in the cfg' surfaces than cfg'ing in cached_image.rs :)
2025-05-05 15:34:52 +02:00
Simon Hausmann
302926edfa
Skia: Improve multi-window rendering resource consumption (#8304)
Share Vulkan instance as well as Metal device and command queue across windows.
2025-04-29 18:58:09 +02:00
Simon Hausmann
33581182ef backend-selector: Add the ability to configure WGPU
The `require_wgpu_24` function accepts either a fully setup WGPU, or one
can configure individual aspects such as features/limits.

The wgpu_texture example uses this to add push constants to the required
features and thus eliminates the need for uniform buffers.
2025-04-29 17:46:57 +02:00
Simon Hausmann
da5e7d5b22 WGPU: Add support for using WGPU textures in Slint
This adds a `unstable-wgpu-24` feature that exposes WGPU types in the
GraphicsAPI enum, adds `require_wgpu_24()` to the backend selector,
and adds a conversion from `wgpu::Texture` to `slint::Image`.

The `require_wgpu_24()` function in the selector will be extended in the
future (before the next release) to permit specifying additional aspects
of the WGPU configuration.

Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2025-04-29 17:46:57 +02:00
Simon Hausmann
6595aee73c
Replace use of Rc<winit:🪟:Window> with Arc (#8257)
In preparation for wgpu usage, where the wgpu API requires the window
handle to be send, i.e. Arc<dyn HasWindowHandle>.
2025-04-24 13:28:51 +02:00
Simon Hausmann
eb825f2e95 Support default-font-* properties in Live-Preview
... by changing the resolution for the `WindowItem` to traverse the
item tree from the current item, instead of going to the window.

This doesn't quite fix #4298 because `rem` resolution is still missing.
That requires the built-in default font size function to be fixed as
well, which is non-trivial.

cc #4298
2025-04-24 09:18:45 +02:00
Olivier Goffart
78a3757b7f
Remormat all the toml file again to fix npm upload
Commit cd6f2e2 reformated the .toml, but the 80 char width column is
judged too small to be practical

Add a .taplo.toml file

Also do not split feature array
2025-04-09 15:06:00 +02:00
Olivier Goffart
40e32a4c36
Skia: round_out the physical dirty region before presenting
Same algotithm as in SkiaRenderer::render_components_to_canvas

Fixes #8066
2025-04-08 13:29:35 +02:00
Tobias Hunger
cd6f2e2cf2 ci: Format toml files
... using taplo with default settings

I tried this with 4 spaces indentation, but the patch is almost as
big as this one, so I went with default settings instead as that
is just easier:-)
2025-04-02 11:03:41 +02:00
Simon Hausmann
8d7d947e31 Update Skia
This aligns with Milestone 135, see https://github.com/rust-skia/rust-skia/releases/tag/0.84.0 for more details.
2025-03-31 11:12:27 +02:00
Simon Hausmann
a0823d8638
Skia: Use software rendering by default on Windows (#7934)
We've had some reports like #7641 . Now that we enable partial rendering by default, let's default to software rendering for Skia on Windows, until perhaps the Skia dawn backend arrives.

Closes #7641

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-03-25 10:04:49 +01:00
Tomáš Procházka
b97cce762b Fixes vulkan validation error 2025-03-22 17:51:06 +01:00
szecket
ed47d1e70a
matching the math for skia and femtovg renders for radial gradient (#7899) 2025-03-21 10:53:04 -04:00
Simon Hausmann
ec88305867 Update Skia Bindings
This allows reverting 18db3210d6 and

Fixes #6615
2025-02-23 17:11:52 +01:00
Yuri Astrakhan
feb7a864df Auto-fixed clippy::useless_format
See https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::useless_format

cargo fmt --all
```

`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.
2025-02-07 13:16:50 +01:00