Commit graph

1594 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
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
Olivier Goffart
21ee7e6aa7 Prospective CI fix
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 (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 (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
The new release rustix 1.1.1 fails to compile on android when it's
feature "process" is activated. This is enabled by the zbus crate

We do not need zbus from i-slint-backend-winit on android
(actually we do not usually use that backend on android, but we just
compile it there on the CI for the internal docs)
2025-09-09 12:50:15 +02:00
Simon Hausmann
0b06b3f1d7 Fix slide puzzle not resizing with the html canvas
Improve detection of explicitly sized canvas elements, by looking for css rules that applie (!= "auto" in computed style) or explicit inline style width/height.
2025-09-09 10:34:17 +02:00
Simon Hausmann
d320e6e852 Fix incorrect size of several wasm demos
Commit 1c73144b09 (famous resume protocol) change the overal timing and sequence of window creation. As it happens now, when
we set_visibility() is called and we try to preserve a "browser" assigned canvas size,
we do so even for windows where we decided we want to go with the preferred size. This restores the todo/underlay/etc. demos.

With commit bcfa1eaa2e we now end up computing current_size as (10, 10) for the slide puzzle (which has no min-width in Slint),
which differs from (0, 0). But we really shouldn't try to assign a size in the first place.
2025-09-09 10:34:17 +02:00
Olivier Goffart
2b6a3ee5fc Fix compilation after version upgrade
The version replacement script matched something it shouldn't match
2025-09-08 12:02:49 +02:00
ogoffart
09e397f3ba Bump version number to 1.13.1 2025-09-08 09:43:17 +00:00
autofix-ci[bot]
37964e0aad [autofix.ci] apply automated fixes 2025-09-07 08:14:08 +02:00
minicx
2b682cc125 LinuxKMS: Collect formats from all CRTC-compatible planes
Instead of returning formats from only the first associated plane,
collect all unique formats from planes.

Signed-off-by: minicx <minicx@disroot.org>
2025-09-07 08:14:08 +02:00
minicx
fad0c84900 LinuxKMS: Enable universal planes capability before enumerating formats
Set DRM_CLIENT_CAP_UNIVERSAL_PLANES before calling plane_handles() to
ensure all planes (primary, overlay, cursor) are visible for format
detection. This fixes cases where plane enumeration returns empty
results due to missing client capabilities.

Signed-off-by: minicx <minicx@disroot.org>
2025-09-07 08:14:08 +02:00
minicx
c2819b451b LinuxKMS: Add XRGB8888 fallback when no DRM plane formats found
Instead of failing when no plane formats are detected, fall back to
XRGB8888 which is widely supported. This prevents crashes on systems
where plane enumeration fails while still allowing the display to
function with a common pixel format.

Signed-off-by: minicx <minicx@disroot.org>
2025-09-07 08:14:08 +02:00
Ashley
186dd45252
QT: Hook up cursorFlashTime and pass the value to TextCursorBlinker (#9311)
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 (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 / updater_test (0.3.0) (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 / 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 / fmt_test (push) Blocked by required conditions
* Test cursor blink rate

* [autofix.ci] apply automated fixes

* Add documentation

* Update internal/backends/qt/lib.rs

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

* Rename to cursor_flash_cycle

* Handle negative values, pass cycle_duration to start instead

* Remove argument from TextCursor::new

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-09-04 23:56:44 +12:00
Simon Hausmann
42c683ce28 LinuxKMS: Fix build with just renderer-femtovg
Fixes #9321
2025-09-04 08:56:28 +00:00
Simon Hausmann
29d88f1bbc Prospective build fix for compiling without implicitly enabled features in the Windows crate 2025-09-04 08:38:23 +02:00
U-ALDEBERAN\Nate
465740a0c3 Windows: Use WM_SETREDRAW to disable redraw when rebuilding muda menus
When the state of menus are changed, the `muda` representation of menus is completely torn down and rebuilt.  On Windows, this can create a slight flicker unless the act of redrawing the window is disabled.  With this change, we use `WM_SETREDRAW` to disable redrawing while the menus are being reconstructed.

It isn't clear to me if other platforms have a similar problem.
2025-09-03 20:22:26 +02:00
Olivier Goffart
085d122a04
Qt: Fix rendering of LineEdit clear button
- Take in account the scale factor (unfortunately we don't have access to the actual window scale factor so just use the Qt one)
- Draw directly in the final SharedPixelBuffer
- Use an intermediate Rectangle to center the image because otherwise we get height for width dependency that breaks layout.
2025-09-03 14:51:49 +02:00
Olivier Goffart
e2d533877e
Qt: don't include the full of QtWidgets (#9312)
So it doesn't need to include GL/gl.h which cannot be found on some
systems
Fixes #9309
2025-09-03 13:17:20 +02:00
Simon Hausmann
547d58784d LinuxKMS: Fix feature and method name for libinput event hook
cc #8958
2025-08-25 14:59:39 +02:00
Olivier Goffart
5abd7f9766
winit: Rename WinitWindowEventResult -> EventResult
We use that enum in the new `CustomApplicationHandler` which is no
longer attached to a Window, and this is in the winit module anyway
2025-08-22 20:10:50 +02:00
Simon Hausmann
2c025a6b67 Fix warnings about dead code
The requested_graphics_api fields are not used in all cfgs. Added ` _`_ instead as that's less error prone than a cfg forest.
2025-08-22 17:48:42 +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
a5c6dc8808
winit: Fix showing a previously hidden window (#9224)
When the API set_visible() call comes in, but we don't have a winit
window yet, make sure the WinitWindowAdapter is registered for window
creation.

Test: tests/manual/windowattributes -> toggle visibility under wayland
2025-08-22 10:06:21 +02:00
dfaure
e2053ee3a8
Add support for the Back key on Android (#9172)
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly-2025-08-15) (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 (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / docs (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 / 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_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 / 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 / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
* Add support for the Back key on Android

Successfully tested with this code
```slint
    forward-focus: my-key-handler;
    my-key-handler := FocusScope {
        key-pressed(event) => {
            if (event.text == Key.Back) {
                root.close();
            }
            accept
        }
    }
```
but also without (that was the hard part: letting Android
terminate the activity on Back if it's not accepted by slint,
which no longer happened after returning Some(...) in key_codes.rs)
2025-08-21 22:08:46 +02:00
Simon Hausmann
981f24370f Remove default font size from StyleMetrics
Only the Qt style provided this, and when used with the Qt backend the font size will be correct as delivered by the renderer trait.
2025-08-21 14:29:55 +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
npwoods
19d8350273
support for menus with checkmarks (#9056)
Added `checkable` property to `MenuItem` and `MenuEntry`

ChangeLog:  Added `checkable` and `checked` property to MenuEntry
2025-08-21 09:07:01 +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
2ffb01c303 winit: Re-add support for fallback renderer creation
This re-instantes the code path for a suspended renderer creation possibly failing.
2025-08-19 14:57:21 +02:00
Olivier Goffart
257c0419a8 Qt: fix drawing of blur
Avoid the waring
```
QGraphicsEffectSource::draw: Can only begin as a result of QGraphicsEffect::draw
```

Should fix #4008
2025-08-15 17:09:11 +02:00
Simon Hausmann
6b94f57b8c CI: Fix cargo build -p slint --features renderer-skia,renderer-femtovg-wgpu build
Enabling the wgpu feature in i-slint-renderer-femtovg implicitly enables
the i-slint-core/unstable-wgpu-26 feature, which means the ImageInner
enum has a WGPUTexture variant. That one in turn must be matched in the
Skia renderer, when looking at the ImageInner variants. Fix this by also
enabling the unstable-wgpu-26 feature in i-slint-backend-winit and thus
i-slint-renderer-skia. This doesn't automatically enable the API though.
2025-08-15 16:14:28 +02:00
Simon Hausmann
b0dae934ed FemtoVG: Support compiling without OpenGL
Building with --no-default-features --features compat-1-2,backend-winit,renderer-femtovg-wgpu
should not require glutin.
2025-08-15 14:04:13 +02:00
Simon Hausmann
bcfa1eaa2e winit: Avoid panics due to zero width/height windows
Don't pass zero min/max sizes to winit, as from there on it might get
back to us, and we'll try to create zero sized rendering surfaces. But
even if we bailed out then, it would be unusable for the user.

For example, this avoid panics or crashes in the live-preview when
editing window/layout code that ends up with a zero min/max height.

Fixes #8926
2025-08-15 14:01:17 +02:00