Commit graph

1591 commits

Author SHA1 Message Date
Arnold Loubriat
82dd83d29f
Implement increment, decrement and set-value accessibility actions on Slider (#9975)
Changelog: Implemented increment, decrement and set-value accessibility actions on Slider (#9975)
2025-11-06 11:13:35 +01:00
Olivier Goffart
184102a2dc Rust: Fix two way binding to different structs
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 line was added by mistake in a previous commit.

But the feature can't work for C++ and the interpreter for now because
they can't re-use the same binding.
It would also break for eust if there was another layer of two way
binding.
That's because `impl BindingCallable for TwoWayBindingWithMap` doesn't
(and can't) implement intercept_set_binding
2025-11-05 10:55:02 +01:00
Arnold Loubriat
6348dc4b19
Add the accessible-id property (#9940)
Changelog: Added the `accessible-id` property
2025-11-05 10:54:11 +01:00
Olivier Goffart
0700b833f0 C++ live preview: fix getting model in C++ from a defined array in slint
This fixes the printerdemo when using live-preview feature as the
main.cpp tries to load the printing queue from the existing model
2025-11-05 08:32:19 +01:00
Olivier Goffart
a8ef4a05e6
Saner codegen for debugging enum
The previous code would create many many lambda and if conditions which
would cause nesting to be way too high for big enums.

Also improve the C++ codegen for condition to use the ternary operator
when possible

Fixes #9954
2025-11-04 16:13:37 +01:00
Olivier Goffart
dbf9b2bb44 More optimization when the scale factor is constant
When compiled with a const scale factor, we don't want to register too
many dependencies to the scale factor.
2025-11-04 14:05:50 +01:00
Lance
bbd5d8554b
Add stroke-line-join for Path (#9912)
* Add `stroke-line-join` for `Path`
* Add `LineJoin` enum
* Add `stroke-line-join` property for `Path`
* Set line_join in Skia and FemtoVG renders
* Set pen_join_style in Qt backend
* Add example test case
* Docs: Add `stroke-line-join` property for `Path`
2025-11-03 10:25:04 +01:00
Olivier Goffart
e34064e905 properties: fix setting properties via two way binding to struct fields
... when there are two level of indirection, as it is the case with the
interpreter as it tries to create mapping to Value as one first level of
indirection
2025-10-30 10:07:48 +01:00
Olivier Goffart
e2670075fa C++: Fix close popup from deleted parents
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.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 / 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-embassy (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 (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / slintpad (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
CI / material-components (push) Blocked by required conditions
C++ part of #9722
2025-10-28 20:25:24 +01:00
Olivier Goffart
f07f9fcd70 C++: Fix crash when accessing C++ parent
C++ part of #3464
2025-10-28 20:25:24 +01:00
Olivier Goffart
ad293efa4b Two ways binding to struct fields with C++ 2025-10-24 17:33:13 +02:00
Olivier Goffart
e11015e7b3 Two way binding with struct for the interpreter
Also fix #9765 while i'm at this by having a two way binding through a
Value for the struct
Fixes #9765
2025-10-24 17:33:13 +02:00
Olivier Goffart
0b994518b9 Two way bindings to struct fields (Rust only) 2025-10-24 17:33:13 +02:00
ogoffart
cad0a8ea83 Bump version number to 1.15.0 2025-10-24 14:28:17 +00:00
Andreas Monitzer
affbb7b9fa
Scroll Into View for Focused Item
Implement a "scroll to make points visible" function to Flickable, automatically scroll to the bounding box of an element when it gains focus.

ChangeLog: When resizing the window, try to keep the focus item visible if it's in a Flickable.
ChangeLog: When focusing an element that's not fully visible, try to scroll a parent Flickable so that it is.

Fixes #3067
2025-10-24 12:19:30 +02:00
ogoffart
db7e383e33 Bump version number to 1.14.1 2025-10-22 13:17:31 +00:00
Olivier Goffart
418eafb18c Run cargo xtask check_license_headers --fix-it
Some checks are pending
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, 1.88) (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-14) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (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 / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / wasm_demo (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 / 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
2025-10-21 17:53:39 +02:00
Benny Sjoestrand
30a2e2dc45 For the module-buils example, change Copyright line to KDAB 2025-10-18 16:20:22 +08:00
Tobias Hunger
e04989095d
compiler(rust): Make popup window opening and closing more robust (#9687)
* tests: Add a test for another popup-induced panic

* compiler(rust): Make popup window opening and closing more robust

Do not make the generated rust code trigger a panic when the parent no
longer exists.

Fixes: #9722 (rust only)
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-10-14 08:55:05 +02:00
Olivier Goffart
6cc2273cfb Add back the rotation-origin-* properties as deprecated 2025-10-10 16:07:02 +02:00
Olivier Goffart
1f78c51b1e Rename rotation-origin-* to transform-origin of type Point
TODO: restore the old names for Image and Text as deprecated
2025-10-10 16:07:02 +02:00
Olivier Goffart
4e33d011b1 Rename rotation-angle => transform-rotation
Keep the old property as deprecated only on Image and Text
2025-10-10 16:07:02 +02:00
Joshua Goins
e820fe3a34 Add new widget test for ScrollView, test the scrolled callback
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.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 / 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
As brought up in 7d038eb9e2, the bug
I was fixing should really have a test for it - so I added one.
Testing the scrolled callback is a bit odd to handle because not
only does each style have a different scroll handle but it's a bit
dubious when/how many scrolled callback emissions there should be.

I was able to find a sweet spot for both of these problems, and
although the test case is a bit vague it does catch when a style
doesn't emit the callback.
2025-10-08 17:05:49 +02:00
Olivier Goffart
9329091c2c
Math.sign: Change behavior to return 1 when 0
This is consistent to the Rust/C++ behavior
Even if this depart from the JS behavior

Also replace the function with a Macro

As discussed in https://github.com/slint-ui/slint/issues/9651#issuecomment-3376318439
2025-10-08 09:12:13 +02:00
Olivier Goffart
8ce8a94a26 Rename scale* property to transform-scale*
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 / 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 / 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 / docs (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 / cpp_package_test (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / vsce_build_test (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 / material-components (push) Blocked by required conditions
This is to avoid reserving the `scale` property on every element which
is a common property name
2025-10-07 16:15:06 +02:00
Olivier Goffart
90b9872e77 Add a scale property to all elements
`scale-x` and `scale-y` defaults to that
2025-10-07 16:15:06 +02:00
David Faure
fa7817981d layout tests: add missing compiler-based tests
Those were interpreter-only tests, better check the compiled case too.
2025-10-07 09:01:14 +02:00
Nigel Breslaw
9c20beadba
Tools: Remove the unnecessary 'FF' from generated colors (#9594)
* Tools: Remove the unecessary 'FF' from generated colors

When colors in most UI tools are 100% alpha the extra 'FF' is auto cut 
off for readability. e.g. #000000FF becomes #000000. Since introducing 
the new color pickers this has been the case on the UI side. However the 
code generator for gradients was inconsistent and would still add in the
unnecessary 'FF'. This fixes that and makes generated gradient code
tidier.

* Fix correct tests

* Fix

* [autofix.ci] apply automated fixes

* Fix

* Fix

* Fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-02 16:53:22 +03:00
David Faure
c192ba9ffa Implement missing interpreter tests in tests/cases/layout 2025-09-29 15:28:48 +02:00
Olivier Goffart
477261bd55 Fix C++ Test that are known to contain warnings
Some warning about unused variable may not be worth trying to silence in
generated code because they usually come from buggy code in the first
place (useless statements)
So whitelist these warning from the test
2025-09-29 15:28:28 +02:00
Olivier Goffart
ace0199f12 compiler: Fix rust generated code adding a ; in parentheses
A cast to void in an expression sometimes added a `;` at the wrong
place.

Fixes #9546
2025-09-29 15:28:28 +02:00
Leon Matthes
5da71fa87e
Warn about and Remove statements without effect (#9474)
Some checks are pending
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (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 / 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-14) (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 (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 / 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
In code-blocks, only the final expressions value is actually used. All
other expressions must have side effects or are otherwise useless.

This usually indicates an error by the programmer, so emit a warning to
notify the programmer about the issue.

Closes #4954

Example from the associated issue:

This Slint code

```slint
FocusScope {
    key-pressed(event) => {
        if (event.text == "a") {
            accept
        }
        reject
    }
}
```

Looks like it would return accept, but in fact, the statement has no effect.

Changelog: The slint compiler now emits a warning if a statement is without effect
2025-09-24 20:54:06 +02:00
Olivier Goffart
f01b9de5ed
core: Fix constraints for empty layout
- Respect the padding even for empty layouts
 - When there is a non-default alignment, layouts shouldn't have a
   max size: Fix the case for empty layout
 - Remove max constraint in the orthogonal direction of an empty layout
2025-09-24 18:20:13 +02:00
Olivier Goffart
6b9b9d9b19
material: change doc examples to import from @material 2025-09-24 18:19:39 +02:00
Olivier Goffart
4ce64c3478
material: Move the source code to ui-libraries/material/src
That way we can create an archive with just the `src` that doesn't
contains the docs and example that can be moved in that folder
2025-09-24 15:28:06 +02:00
Olivier Goffart
a11efb7db9
Test: Make sure bundle translations works without a context id
Some checks are pending
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 / 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 / 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 / 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 / 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 / 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-09-24 12:03:01 +02:00
Bryce Happel Walton
e8d878655c
Add Math.sign(x) (#9444)
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 / python_test (ubuntu-22.04) (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 (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (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 / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (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_package_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 / mcu-embassy (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 / test-figma-inspector (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
add sign builtin

Closes: #6205
2025-09-22 11:49:11 +02:00
David Faure
242065a9a3 GridLayout: make row and col available even when implicit
Fixes #9450
2025-09-22 11:46:56 +02:00
David Faure
e698e6360b GridLayout: make rowspacing and colspacing available even when implicit 2025-09-22 11:46:56 +02:00
Nigel Breslaw
bb001640d2
Integrate the Material project with the CI (#9462)
Some checks failed
CI / cpp_test_driver (macos-13) (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / build_and_test (ubuntu-22.04, nightly) (push) Has been cancelled
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / python_test (macos-14) (push) Has been cancelled
CI / python_test (ubuntu-22.04) (push) Has been cancelled
CI / python_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / tree-sitter (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
CI / wasm_demo (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
This leaves 3 open issues:
1. WASM build.
2. APK build.
3. Test is testing too much and something needs fixing in the cargo.toml?
2025-09-19 13:58:42 +03:00
Benny Sjöstrand
0bda0a64eb
Add support for importing Rust types from another crate Slint compilation (#9329)
To implement an external Slint library, the types and components implemented
in the .slint files needs to be exposed through the Rust crate.
A simple example example/app-library is added to demonstrate how to use this feature.

CC #7060
2025-09-16 09:01:44 +02:00
Gustavo Henrique Montesião de Sousa
973917c0f0
Close active sibling popups before creating a new one (#9178)
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 / 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 (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 / 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 / ffi_32bit_build (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 / docs (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
Fixes #8891
2025-09-15 19:18:43 +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
Olivier Goffart
d190dc74bb Fix clicking outside of a context menu that is in a condition
The ContextMenuArea can, in fact, be root
2025-09-11 19:21:32 +02:00
ogoffart
f2aa4899db Bump version number to 1.14.0 2025-09-11 14:01:14 +00: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
ogoffart
09e397f3ba Bump version number to 1.13.1 2025-09-08 09:43:17 +00:00
Olivier Goffart
2faae11b6b SwipeGestureHandler: better support of embedded SwipeGestureHandler's
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 (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 (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 / wasm (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 / wasm_demo (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
- When checking the threshold, make sure that the change in the
   interrested dirrection is much more significant that the delta in the
   orthogonal direction (hence the `/ 2`)

 - Accept all mouse move event as we otherwise don't get them further if
   the event was delayed by another SwipeGestureHandler or flickable
2025-09-07 10:03:06 +02:00
Olivier Goffart
b7701e72a2 Compiler: Fix recurse_elem_including_sub_components_no_borrow when called before process_repeater_components
Same as in `recurse_elem_including_sub_components`

This happens for example in `lower_menus` which resulted in the pass
being done twice in some component which would cause errors.

Fixes #9319
2025-09-05 13:12:26 +02:00
Olivier Goffart
b23f8ad997
Parse: accept changed callback without brace
For consistency with the normal callbacks
2025-08-29 14:49:47 +02:00