Joshua Goins
c09ed19a85
Menu: Add icon property
...
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.
Closes #7791
ChangeLog: Added icon property to MenuItem and Menu
2025-06-26 18:45:37 +02:00
Olivier Goffart
3823c1e8da
Experimental support for Drag & Drop
...
Add a `DragArea` and `DropArea` elements.
It is currently gated as experimental.
2025-06-26 15:39:18 +02:00
Simon Hausmann
06a19e59ad
slint: Change Platform.os to return a new enum OperatingSystemType ( #8679 )
...
* slint: Change Platform.os to return a new enum OperatingSystemType
cc #8631
2025-06-12 14:25:16 +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
Olivier Goffart
7b4d2fd3d3
Renames after the API review
...
CC #8631
2025-06-06 12:31:50 +02:00
Avery Townsend
8c4ccabf7d
Expose FocusReason
to .slint as an argument in focus-event-changed
and add focus-gained
and focus-lost
callbacks ( #8569 )
...
This exposes FocusReason to .slint, and adds it as an argument to focus-event-changed callback on FocusScope to close #8387 . It also adds two new callbacks, focus-gained and focus-lost, which are identical to focus-event-changed but are only invoked on focus gain or loss respectively.
In addition to this, it removes the FocusEventReason::AccessKit variant, replacing it with the mouse variant to hopefully make AccessKit more compatible with any Slint code that will use FocusEventReason.
Finally, I added two tests based on focus_change_event.slint, one for testing the FocusEventReason argument and another for testing the new callbacks.
close #8387
ChangeLog: Added `focus-gained` and `focus-lost` callback to FocusScope. Pass an `FocusReason` enum to the FocusScope callbacks
2025-06-04 09:51:26 +02:00
Simon Hausmann
554c73f1ef
Fix build on QNX
...
CI / files-changed (push) Waiting to run
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.82) (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, 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 / 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_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.82) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.82) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / mcu-embassy (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 / miri (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
- The memmap2 dependecy doesn't compile on QNX, so disable fontdb's memmap feature on QNX (besides WASM)
- Assume the availability of the Noto Sans font from the fonts system package
2025-06-03 08:55:31 +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
512ead118f
Fix fontdb panic on iOS
...
There's a directory where we can look for fonts, within the iOS sandbox.
This is needed for SVGs with text.
2025-05-09 11:36:10 +02:00
Joshua Goins
d1f2fef430
Menu: Add enabled property ( #8145 )
...
By default it's enabled, of course. This property is not only added to
MenuItem, but Menu as well - since they can be nested. It's also
possible to select a disabled item, but it's hard to modify that since
it's logic is written in Slint. You should be prevented from activating
it with a tap or key press at least.
See #7791
2025-04-15 08:08:11 +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
e5289af154
Introduce MenuSeparator
...
Fixes #7790
2025-04-02 11:50:45 +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
368ec3459b
Improve default accessibility of TextInput
elements
...
Apply similar logic as to LineEdit and TextEdit, so that when folks build their own text input widgets, they're accessible by default. Also fixed the docs while at it to mention default applications.
Amends #7669
2025-02-20 13:44:16 +01:00
Arnold Loubriat
90c337f1d1
Add AccessibleRole::Image
and use it in the AboutSlint
widget ( #7593 )
...
* Add `AccessibleRole::Image`
* Improve accessibility of the `AboutSlint` widget
* Filter out some images from the accessibility tree
2025-02-18 09:43:53 +01:00
Simon Hausmann
5b241e493a
Fix path in comment for key mappings
...
namespaces.md doesn't exist anymore, the key mapping snow in a different part of the docs.
2025-02-07 16:45:01 +01:00
Yuri Astrakhan
4ae2627ade
A few more format arg inlining
...
Used these commands and some manual searching
```
cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-07 06:43:19 +01:00
Simon Hausmann
0d723953f9
Add support for line caps in Path Strokes
...
ChangeLog: Added `Path::stroke-line-cap` property.
Fixes #4676
2025-01-20 22:28:45 +01:00
Simon Hausmann
aa332202c5
Rename AccessibleRole.GroupBox to AccessibleRole.Groupbox
...
While unfortunate in casing, this is consistent with Checkbox, Combobox, and Spinbox.
2025-01-10 16:27:14 +01:00
Arnold Loubriat
49196728a7
Add AccessibleRole::GroupBox
2025-01-07 23:08:03 +01:00
Arnold Loubriat
3304df0f82
Add AccessibleRole::TabPanel
2025-01-06 09:30:11 +01:00
Nigel Breslaw
2eedfcc1a2
1.9 Docs: Turn on link validator ( #7057 )
2024-12-11 01:20:02 +02:00
FloVanGH
0bd242cb1b
popup: close popup on escape press. ( #6978 )
...
* Update internal/common/enums.rs
Co-authored-by: Arnold Loubriat <datatriny@gmail.com>
---------
Co-authored-by: Arnold Loubriat <datatriny@gmail.com>
2024-12-03 13:46:32 +00:00
Olivier Goffart
5bd20def0e
Experimental support for MenuBar
...
Introduces `MenuBar{ ... }` that can be put in a Window
2024-11-20 09:25:37 +01:00
FloVanGH
14c7910d49
PopupWindow: added close-policy property ( #6614 )
...
* Update api/cpp/include/slint_window.h
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update docs/reference/src/language/builtins/elements.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/core/window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/eval.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/backends/qt/qt_window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/dynamic_item_tree.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/compiler/passes/materialize_fake_properties.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-10-24 09:27:39 +00:00
Olivier Goffart
c4cefb3007
Janitor: typo fix
2024-10-09 15:26:18 +02:00
Renato Araujo Oliveira Filho
1e4de3fe0c
Implement ScrollBarPolicy property for ScrollView ( #6442 )
...
ChangeLog: ScrollView: added vertical-bar-policy and horizontal-bar-policy
Fixes : #3552
Fixes : #5578
2024-10-08 17:02:17 +02:00
Simon Hausmann
0b028bfb6f
Add support for a font-metrics property to Text/TextInput. ( #6452 )
...
The struct held provides access to the design metrics of the font scaled
to the font pixel size used by the element.
ChangeLog: Slint Language: Added font-metrics property to `Text` and `TextInput`.
Closes #6047
2024-10-05 17:00:46 +02:00
Josh Wood
6a131e2648
Added PropertyAnimation.direction
property for controlling animation direction ( #6261 )
...
Closes #6260
ChangeLog: Added property for controlling animation direction
2024-09-24 19:55:24 +02:00
crai0
3f3ac7e347
common: add support for back and forward pointing-device buttons ( #6149 )
...
Closes #6043
ChangeLog: add support for back and forward pointing-device buttons
2024-09-18 07:48:30 +02:00
Arnold Loubriat
f01420258f
Changelog: Introduce AccessibleRole::ListItem
2024-09-16 09:15:39 +02:00
Simon Hausmann
cc47d6863f
Improve WordWrap docs
2024-07-05 09:47:57 +02:00
Olivier Goffart
c89ea56abb
Update a bunch of dependencies
...
Bigger change is cause by resvg/usvg which now takes the font database
in a Arc, so we must store it in a Arc ourself to cheaply lend it to usvg
2024-06-23 16:47:13 +02:00
Simon Hausmann
39f49c468d
doc: Add a little note about CharWrap
2024-06-18 08:53:20 +02:00
Daniel Stuart
9f63d157d1
Add character wrapping for Qt Backend
...
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
2024-06-17 23:52:04 -07:00
Simon Hausmann
f1987cd208
Fix links to widgets in AccessibleRole docs embedded in i-slint-backend-testing docs
...
The relative links don't work, so use slint-reference: custom schemes that works with sphinx and is rewritten with JavaScript through injections.
2024-06-12 07:17:35 -07:00
Simon Hausmann
97df6b1be1
Mark AccessibleRole as non-exhaustive
...
That way we can add new variants in the future, while still exporting this in our public API.
2024-06-11 08:02:10 -07:00
Tobias Hunger
d9224cd58f
janitor: Use more workspace dependencies
2024-06-04 14:58:29 +02:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Noah Sweilem
6ede27a364
Add text stroke properties to Text
element
2024-04-26 13:16:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License ( #4994 )
...
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Arnold Loubriat
e17b1fda8b
Properly expose Switch
as such in the accessibility tree
2024-04-08 08:41:47 +02:00
Simon Hausmann
68083243b2
Add an in-out boolean color-scheme property to Palette ( #4701 )
...
This allows applications to force dark/light mode, as well as determine
which mode is active.
2024-03-26 15:44:22 +01:00
Montel Laurent
fc0e8faae9
Accessibility: use tab-list for the tabwidget ( #4909 )
...
* Don't show tabwidget as tab
2024-03-21 17:48:42 +01:00
Montel Laurent
da30fa2663
Add ListView accessibility role ( #4911 )
2024-03-21 15:20:43 +01:00
Montel Laurent
4844b84e0c
Add Treeview accessibility support ( #4907 )
2024-03-21 15:18:52 +01:00
Montel Laurent
c2517008d8
Add TextInput as accessibility role ( #4899 )
2024-03-21 13:39:31 +01:00
Tobias Hunger
28b96ca6f6
janitor: manual cargo clippy fixes
...
Semi-random selection of clippy topics that were
uncontroversial before:-).
Leaves about 84 deduplicated issues in the code base
according to clippy from nightly.
2024-03-14 13:42:38 +01:00
Simon Hausmann
d5f18b3cae
doc: Small typo fix
2024-03-07 13:29:27 +01:00