Commit graph

1624 commits

Author SHA1 Message Date
Simon Hausmann
19975846f5 renderer: Remove the str slice from text_size()
Instead, hide access to the string behind a RenderString trait.

The objective in the future is to cache the layout, which means that we need to query the text and other properties only if the cache is dirty.
2025-11-07 12:41:52 +00:00
Simon Hausmann
e6f74960d4 text: Introduce char_size() in the renderer to simplify size computation for text input and text elements
To compute the logical size of a character we need less parameters and
properties than for an entire string.
2025-11-07 12:41:52 +00:00
Simon Hausmann
fc54b48fdf parley: Create the font request for text_size inside shared parley code 2025-11-07 12:41:52 +00:00
Simon Hausmann
3a6d873c43 parley: Create the font request for draw_text_input inside shared parley code 2025-11-07 12:41:52 +00:00
Simon Hausmann
098af0843e parley: Create the font request for draw_text inside shared parley code 2025-11-07 12:41:52 +00:00
Simon Hausmann
1c93acc701 renderer: Simplify text_input_cursor_rect_for_byte_offset 2025-11-07 12:41:52 +00:00
Simon Hausmann
c7b23077e3 renderer: Simplify text_input_byte_offset_for_position
Instead of letting each caller create the FontRequest in the same way, do it once in sharedparley.
2025-11-07 12:41:52 +00:00
Andreas
7f21826607
Add support for FB Renderer Format DrmFourcc(BA24) in LinuxKMS
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
As suggested in #9862 this PR adds support for FB Renderer Format DrmFourcc(BA24) in LinuxKMS.

Changelog: Added support for FB Renderer Format DrmFourcc(BA24) in LinuxKMS
Closes #9862
2025-11-05 19:50:32 +01:00
Simon Hausmann
2fa4db23de renderer: Remove the scale factor argument from the text functions
Instead of each caller obtaining the scale factor, the renderer can do that, too. This also eliminates the dependency to the scale factor where it's not needed, such as for the font metrics.
2025-11-05 16:28:35 +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
Anton Helwart
4ea3eab8f5 fix scrollbar jumping bug for qt style 2025-11-04 15:43:50 +01:00
npwoods
4124c9f102
Changing win32_set_window_redraw() to only be functional when the window is visible (#9937)
According to Stack Overflow (https://stackoverflow.com/questions/9248553/wm-setredraw-and-losing-z-order-focus) the default handling of `WM_SETREDRAW` has some weird behaviors for windows that are not visible.  This seems to be the case for Slint windows that are freshly created.

This should fix https://github.com/slint-ui/slint/issues/9921
2025-11-04 09:05:56 +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
MAlba124
0bdb99d2c4
android: provide correct java path to check_javac_version (#9908) 2025-11-03 10:04:20 +01:00
Arnold Loubriat
2949410041 Add AccessibleRole.radio-button
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-03 10:24:30 +08:00
Arnold Loubriat
f4fc53b1fa Set toolkit name and version on AccessKit tree 2025-11-03 09:48:30 +08:00
Simon Hausmann
339a2e0e48 LinuxKMS: Report touch events as touch events to Slint
Some checks failed
CI / cpp_cmake (macos-14, 1.88) (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 / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / test-figma-inspector (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 (macos-14) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (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 (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 / slintpad (push) Has been cancelled
CI / wasm_demo (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 / esp-idf-quick (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / material-components (push) Has been cancelled
cc #4352
2025-10-30 18:51:03 +08:00
Burhan Khanzada
33ab76918f
Add Touch events in WindowEvent (#9858)
for #4352
2025-10-28 10:11:27 +01:00
Olivier Goffart
ab66048efe
winit: Do not enable the x11/wayland feature through accessibility feature
Fix #9861
2025-10-28 09:20:19 +01:00
Ashley
da1689c29e
Experimental markdown rich text: render underlines, strikethroughs and link colors (#9749)
* Underscores and links

* Add color options

* Store links seperately

Gate the links field

* [autofix.ci] apply automated fixes

* Change fill_rectangle to use a brush instead

* Change if let to if is_some

* Fix skia

* Gate structs again

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-28 03:33:14 +13:00
U. Bruhin
677f0b1303 system-testing: Do not panic on TCP communication errors
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly) (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 / node_test (macos-14) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / docs (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 / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / slintpad (push) Blocked by required conditions
CI / wasm_demo (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 / tree-sitter (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 / 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 / test-figma-inspector (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
On any TCP communication errors between AUT and test server, do not
panic with unwrap() anymore but just close the connection and print
the error to stderr. So the application will not panic anymore when
the test server quits.

Reason is that the panic randomly happened during normal test execution,
probably during test shutdown phase. Even though the tests were
successful, on macOS a crash reporter dialog was raised due to the
panic, which is annoying. Fixing the panic will prevent the crash
reporter from unintentionally showing up.
2025-10-26 07:11:15 +09:00
Andreas Monitzer
eae027e936
Safe Area
Changelog: Added four new properties to the Window element for exposing the safe area to Slint and implement it for iOS.
Changelog: Adjust Android implementation of the window safe area to match the iOS implementation. This is a breaking change!

Fixes #9755
2025-10-24 12:24:45 +02:00
Olivier Goffart
2678e76942
Janitor: Dependency updates 2025-10-23 11:10:24 +02:00
Simon Hausmann
c1c89b3257 winit: Fix panic when accessing Palette.color-scheme during muda menubar build
Some checks are pending
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, 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 / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (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 / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, 1.88) (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, 1.88) (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 / 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 / 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 / material-components (push) Blocked by required conditions
When building the muda menubar, we end up evaluating bindings, which in
case of access `Palette.color-scheme` invokes
BuiltinFunction::ColorScheme, which tries to borrow the
winit_window_or_none for winit::Window::theme() access. Fix this by
narrowing the borrow_mut() access window to winit_window_or_none and
construct the muda menubar afterwards.

Fixes #9792
2025-10-22 10:05:39 +02:00
Simon Hausmann
5c8e49ae2f winit: Work around erroneous WindowEvent::Focused calls with have_focus == false on macOS 2025-10-20 23:45:52 +08:00
Simon Hausmann
7af2856665 winit: Fix macos system bar not always being initialized correctly
We remove the menubar when the window looses the focus, but due to
https://github.com/rust-windowing/winit/issues/4371 we see spurious
deactivations. Let's just not remove the old menubar.

When switching between multiple top-level windows the activation of
the new menubar replaces the old.

Fixes #9770
2025-10-20 23:45:52 +08:00
Arnold Loubriat
d79099072d
Set accessible-placeholder-text even when text input is not empty (#9773)
AccessKit now make sure to only expose the placeholder text when necessary, ensuring it is not presented if the text input is not empty. Workarounds in .slint files can therefore be removed.
2025-10-17 17:29:48 +02:00
Olivier Goffart
5fd12cd3b4 Metrics collector: measure dirty region 2025-10-15 16:33:59 +02:00
Tobias Hunger
fe81e0af84
core: Do not panic when closing a popup during rendering (#9666)
* slint: Add test for panic on popups vanishing

* core: Remove popups from the list of open popups

... when a popups parent component gets deleted.

* core: Handle a popup window vanishing while rendering

... using an ItemWeak instead of having an extra sentinel
parameter to pass around.
2025-10-13 10:14:30 +02:00
Simon Hausmann
74471266a3 android: Add support for BackendSelector and require_wgpu_XXX 2025-10-10 16:56:44 +02:00
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
Simon Hausmann
df47f0b4ef femtovg: Upgrade to wgpu 27
Also:
 - The newer version of femtovg permits disabling text layouting, so this means less dependencies
 - Skia is the only renderer left to support wgpu 26, so unstable-wgpu-26 now implies a dependency to renderer-skia

Closes #9605
2025-10-07 14:13:52 +02:00
Simon Hausmann
4f21981555 accesskit: Upgrade to the latest release 2025-10-07 13:20:44 +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
Joshua Goins
7d038eb9e2 Qt: Emit scrolled callback when dragging scrollbar
This is supposed to be emitted whenever the user performs an
intentional interaction, which works whenever you scroll the Slint
Flickable with the scrollwheel. Dragging the scrollbar on the Qt
style didn't do anything, since that was never hooked up to this
callback.

I only implemented this in the Qt style, because that's the only
one that uses the NativeScrollView element.

See #9574.
2025-10-07 09:04:30 +02:00
Joshua Goins
188f940182 Qt: Fix outline rendering with Parley
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly) (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_cmake (ubuntu-22.04, stable) (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 (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
CI / material-components (push) Blocked by required conditions
This fixes a regression seen with 0910024aeb
where text outlines no longer rendered with Qt and the text color
was wrong in general.

It turns out drawGlyphRun doesn't work when drawing outlines. It
only uses the current QPen color and that's it - so not a built-in
way to draw the outlines separately. There was also another bug
where we weren't setting the correct QPen color, which regressed
any dark themes. (Presumably because no one expected it to fill
text with the QPen!)

We can fix this by only using drawGlyphRun for filling in glyphs.
For drawing the glyph outlines, we can skip the built-in QPainter
functions altogether and use QRawFont's ability to create
QPainterPaths for us. This restores the text to its previous
appearance while keeping the nicer text layouting!
2025-10-06 21:45:30 +02: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
a29c22a07b Android: Fix build with unstable-wgpu-26 feature enabled
Fixes #9452
2025-09-19 09:05:31 +02:00
npwoods
0becb6a4ce
muda: On Windows, force the menu bar to be redrawn after menus are rebuilt (#9435)
This fixes #9430
2025-09-16 13:51:29 +02:00
Arkadiusz Żmudzin
a857fe6850 Refactor Apple platform detection for keyboard input handling
- Replaced the previous `cfg_if` macro usage for detecting Apple platforms with a new `is_apple_platform` function in `lib.rs`, improving code readability
- Updated the `window_event` function in `event_loop.rs` to utilize the new `is_apple_platform` function for determining the `swap_cmd_ctrl` variable.
- Simplified the logic in `wasm_input_helper.rs` for checking if the platform is Apple by using the new function.
- Adjusted the `text_shortcut` method in `input.rs` to leverage the new platform detection, ensuring consistent behavior for keyboard shortcuts across Apple devices.
2025-09-16 09:02:37 +02:00
David Faure
b23a657c44 Hide Android selection handles when scrolled out of view
In a LineEdit with a long text, when dragging the selection
to the point where the anchor scrolls out of view in the other
direection, it used to keep being visible, outside the LineEdit.

This commit fixes that by passing the clip rect to the java code
that positions the selection handles.
2025-09-16 08:50:29 +02:00
David Faure
92ebe92f62 SlintAndroidJavaHelper.java: fix left/right confusion 2025-09-16 08:50:29 +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
dfaure
8c34ec0a41
Button: add property icon-size (#9279)
It's nice that the default icon size comes from the style, but sometimes
the user wants a big button with a big icon.

Tested in all 5 styles, with PNG and SVG, with and without icon-size
set.

ChangeLog: Added `icon-size` property to Button
2025-09-11 16:14:17 +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