Commit graph

13307 commits

Author SHA1 Message Date
Olivier Goffart
ca2803fe73
Gallery: Dummy menu bar
Add dummy menu bar in the gallery since the gallery should ideally show all widgets, including a menu bar
2025-02-07 19:54:00 +01:00
Simon Hausmann
af2f8a5ab8 stm32: Fix compilation with newer STM BSPs
Neither the BSP_LCD_Relaod typo nor the legacy #define is present in newer BSPs anymore.
2025-02-07 18:19:58 +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
Olivier Goffart
9853384f56
CombBox: Don't change on scroll unless we have focus / not at all on cupertino
* ComboBox: Don't change on scroll uless we have focus

This is what native Windows combobox does.
Otherwise this causes problem when combobox are in scrollable

Fixes #5929

* ComboBox: Don't scroll at all with the wheel on Mac.

This is also Qt's behavior
https://doc.qt.io/qt-6/qstyle.html#:~:text=SH_ComboBox_AllowWheelScrolling
2025-02-07 13:52:14 +01:00
Olivier Goffart
c0b72cad2f
ContextMenu: show submenu on hover after a timeout
This means that the parent menu still get the mouse events

Also add the ability to close the menu programmatically
2025-02-07 13:27:32 +01:00
Yuri Astrakhan
feb7a864df Auto-fixed clippy::useless_format
See https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

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

cargo fmt --all
```

`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.
2025-02-07 13:16:50 +01:00
Nigel Breslaw
ba8e81fecb
Figma codegen for Slint in dev-mode and vscode extension (#7555) 2025-02-07 11:28:57 +02:00
Olivier Goffart
7104c6e88e
Rudimentary key navigation of the popup menu (#7556)
Closing the menus is still not implemented
2025-02-07 10:01:40 +01:00
Yuri Astrakhan
05f4fc0cde Auto-fixed clippy::needless_return
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

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

cargo fmt --all
```
2025-02-07 09:46:49 +01:00
Yuri Astrakhan
9621cae218 Auto-fixed clippy::needless_lifetimes
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

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

cargo fmt --all
```
2025-02-07 09:20:49 +01:00
Arnold Loubriat
0a7d7907b3
Fix Gallery example sidebar accessibility (#7559)
The accessible-delegate-focus property is currently confused by the presence of the label at the top, since it expects an index in the accessible children list. Therefore the focused item would be off by one as far as assistive technologies are concerned.

I also had to move the FocusScope because accessible-delegate-focus is searched for in the ancestors of the element which is focused.

The tablist is now properly reported. Unfortunately these changes raise a more confusing bug: focus changes inside the tablist (using the arrow keys) don't seem to trigger a rebuild of the tree. When a tab is selected it is properly reported though. Even stranger: the focus changes are triggered if the focus is on the sidebar, when the toplevel window gains focus. Tabbing out of the sidebar and back on triggers the bug again though.
2025-02-07 09:11:11 +01:00
Yuri Astrakhan
6324b35e94 Auto-fixed clippy::needless_borrow
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow

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

cargo fmt --all
```
2025-02-07 09:02:45 +01:00
Yuri Astrakhan
bcb2953f00 Auto-fixed clippy::unnecessary_map_or
This is a hacky approach, but does help a lot with the tedious fixes.

See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or

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

cargo fmt --all
```
2025-02-07 09:02:31 +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
Yuri Astrakhan
5356fdcf89 Fix clippy issues, plus a few manual cleanups
* Run `cargo clippy --fix`
*  `BackendSelector` is easier to instantiate with auto `Default`
2025-02-06 17:28:51 +01:00
Bedis Nbiba
417eaeb38a
fix(node): prevent 100% CPU usage on Wayland by enforcing minimum event timeout (#7550) 2025-02-06 17:00:50 +01:00
Tobias Hunger
4b8287bd0f live-preview: Make property widgets use less information
Make the property widgets work with less information avaiable to
them. I hope I can reuse them for runtime widget state as well that
way.

Unexport the individual widgets and wrap them into a `PropertyValueWidget`
that switches between them as needed -- and fills in the extra information
needed to keep the existing functionality in place.

This makes the PropertyView so much cleaner ;-)
2025-02-06 16:59:05 +01:00
Olivier Goffart
9b60f1b7f3 interpreter: Fix sub menu after invalid clippy fix
This revert 481b29880b and apply the fix
to the right function
2025-02-06 14:59:24 +01:00
Olivier Goffart
2846c35055
TextInput: implement page up/down
CC #474
2025-02-06 14:52:28 +01:00
Simon Hausmann
d855b44668 Always create an app menu for the menubar
This is the discussed stop-gap for macOS for the 1.10 release.
2025-02-06 14:42:20 +01:00
Nigel Breslaw
608f665492
Fix incorrect visible: false docs (#7415)
fixed: #7377
2025-02-06 15:26:07 +02:00
szecket
4af1cd3003 regression of clip corrected 2025-02-06 11:54:21 +01:00
dependabot[bot]
74a6653537
build(deps): bump the playwright group with 2 updates (#7518)
Bumps the playwright group with 2 updates: [@playwright/test](https://github.com/microsoft/playwright) and [playwright](https://github.com/microsoft/playwright).


Updates `@playwright/test` from 1.50.0 to 1.50.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.50.0...v1.50.1)

Updates `playwright` from 1.50.0 to 1.50.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.50.0...v1.50.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: playwright
- dependency-name: playwright
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: playwright
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-06 11:36:49 +02:00
Yuri Astrakhan
61de4d56b0 Fix all format arg inlining
Ran this command:

```shell
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-06 10:16:20 +01:00
autofix-ci[bot]
b040e9450a [autofix.ci] apply automated fixes 2025-02-05 14:26:29 +01:00
Tobias Hunger
595b571f99 live-preview: Make ExpandableGroup more re-usable
I want to use this for runtime properties later.
2025-02-05 14:26:29 +01:00
Tobias Hunger
25f3bfd95c live-preview: Move widgets out of property-view
Move the widgets used for showing property values out
of the property-view itself, so we can reuse them later.
2025-02-05 14:26:29 +01:00
Tobias Hunger
b5520ef370 interpreter: Expose visibility of exported components 2025-02-05 12:56:32 +01:00
FloVanGH
2f03bad1cc
added missing properties to StandardTableView (#7543) 2025-02-05 10:02:22 +00:00
Arnold Loubriat
42773eca64 Don't instanciate ListView items that are just above the viewport when scrolling down 2025-02-05 10:00:49 +01:00
Tobias Hunger
d9c22bcdfe interpreter: Fix clippy warnings
I was just looking whether my change introduced clippy warnings,
but took the opportunity to polish the codebase a bit.
2025-02-05 09:41:00 +01:00
Simon Hausmann
9961a6f44d VecModel<T>: Don't require that T implements Default
ChangeLog: Rust: Removed the requirement that for VecModel<T> T has to implement Default.
2025-02-04 14:49:58 +01:00
Olivier Goffart
02677331a5 LSP: fix completion of extra component specific builtin
Eg: MenuItem or Tab or Path's components
2025-02-04 14:00:06 +01:00
Olivier Goffart
d1b2b284f9
Forward the focus item to the window of the popup (#7533)
With the Qt backend, the PopupWindow has its own Window and the focus item is not
always set to that window. Resulting in the focus appearance, but the keyboard event
wouldn't be taken by that item

Fixes #7529
2025-02-04 13:13:07 +01:00
Olivier Goffart
15088f499f ChangeLog entries 2025-02-04 13:11:29 +01:00
Tobias Hunger
ded82cbb62 interpreter: Add JSON encoding/decoding for the interpreter values
Extract the `from_json` and `to_json` code from the viewer into the `interpreter`.

Extend the `from_json` and `to_json` a bit. Add some simple tests while at it.
2025-02-04 13:06:40 +01:00
Olivier Goffart
88cc96ba73
Make forward-focus in a PopupWindow work 2025-02-04 12:31:06 +01:00
dependabot[bot]
1d42e78c22
build(deps-dev): bump @lumino/widgets from 2.5.0 to 2.6.0 (#7523)
Bumps [@lumino/widgets](https://github.com/jupyterlab/lumino) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/jupyterlab/lumino/releases)
- [Changelog](https://github.com/jupyterlab/lumino/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/lumino/compare/@lumino/widgets@2.5.0...@lumino/widgets@2.6.0)

---
updated-dependencies:
- dependency-name: "@lumino/widgets"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 12:08:22 +02:00
Arnold Loubriat
eeec096bd8 Address review comment
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2025-02-03 20:32:45 +01:00
Arnold Loubriat
358e42a8d5 Add the accessible-action-expand action 2025-02-03 20:32:45 +01:00
Arnold Loubriat
79b4950f41 Remove combo box's inner label from the accessibility tree 2025-02-03 20:32:45 +01:00
Arnold Loubriat
f30f953ffd Add the accessible-expanded property 2025-02-03 20:32:45 +01:00
Arnold Loubriat
53fd7b12e4 Add the accessible-expandable property 2025-02-03 20:32:45 +01:00
Arnold Loubriat
e442965889 Set accessible-value on ComboBox widgets 2025-02-03 20:32:45 +01:00
Tobias Hunger
3d7c447b97 interpreter: Rename highlight feature
... to `internal-highlight`.
2025-02-03 17:38:59 +01:00
Olivier Goffart
13f07018c9 C++: initialize the backend before the translations
Otherwise initializing the translation won't work.

This can't be tested because the testing backend is always initialized before.
And also hasn't been a problem on MCU where the feature is the most usefull
because it also uses custom backend there initialized before
2025-02-03 14:00:59 +01:00
dependabot[bot]
e59e81078c
build(deps-dev): bump vite from 6.0.9 to 6.0.11 (#7468)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.0.9 to 6.0.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 14:26:21 +02:00
dependabot[bot]
8baa47eebd
build(deps-dev): bump @lumino/default-theme from 2.1.7 to 2.1.8 (#7520)
Bumps [@lumino/default-theme](https://github.com/jupyterlab/lumino) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/jupyterlab/lumino/releases)
- [Changelog](https://github.com/jupyterlab/lumino/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/lumino/compare/@lumino/default-theme@2.1.7...@lumino/default-theme@2.1.8)

---
updated-dependencies:
- dependency-name: "@lumino/default-theme"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 12:51:44 +02:00
Simon Hausmann
a28ec80917 winit: Fix support for menu bars provided by native code
Add `with_default_menu_bar` to winit's `BackendBuilder` to permit applications
to provide their own menu bar.

Fixes the lsp's Window -> Keep on top menu on macOS.
2025-02-03 11:30:03 +01:00
dependabot[bot]
173934c2a5
build(deps): bump the starlight_astro group with 2 updates (#7517)
Bumps the starlight_astro group with 2 updates: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) and [starlight-links-validator](https://github.com/HiDeoo/starlight-links-validator/tree/HEAD/packages/starlight-links-validator).


Updates `astro` from 5.1.9 to 5.2.3
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.2.3/packages/astro)

Updates `starlight-links-validator` from 0.14.1 to 0.14.2
- [Release notes](https://github.com/HiDeoo/starlight-links-validator/releases)
- [Changelog](https://github.com/HiDeoo/starlight-links-validator/blob/main/packages/starlight-links-validator/CHANGELOG.md)
- [Commits](https://github.com/HiDeoo/starlight-links-validator/commits/starlight-links-validator@0.14.2/packages/starlight-links-validator)

---
updated-dependencies:
- dependency-name: astro
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: starlight_astro
- dependency-name: starlight-links-validator
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: starlight_astro
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 12:15:23 +02:00