Brandon Fowler
6da0f55b05
Associate PopupWindow
s with an ID for their active popup ( #6693 )
...
Popups are stored in a HashMap and are assigned an ID so popup.close(); closes the correct popup and so a single PopupWindow cannot be opened multiple times
2024-11-04 09:17:55 +01:00
Olivier Goffart
2d944b242c
Support multiple PopupWindow
...
Fixes #4356
Still not perfect:
- Calling several times `popup.show()` on the same popup, will open
that popup multiple times (instead of being a noop once opened)
- Calling `some-popup.close()` will always close the top of the stack,
without considering if it is the `some-popup` or another popup.
Both problems are because we don't remember whether a particular popup
is open and we don't associate `close()` with a particular popup
2024-10-31 22:27:56 +01:00
Olivier Goffart
3ce0e49003
Qt: Fix PopupClosePolicy::CloseOnClickOutside
2024-10-31 22:27:56 +01:00
Arnold Loubriat
97219c21bf
Add the accessible-size-of-set
property
2024-10-30 15:54:01 +08:00
Arnold Loubriat
67166fcc2d
Add the accessible-position-in-set
property
2024-10-30 15:54:01 +08:00
DataTriny
2de3b9d455
Add the accessible-enabled
property
2024-10-25 10:20:09 +02: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
Simon Hausmann
7e3747041f
Fix simulator build
...
Amends ac9b85049a
2024-10-23 19:18:57 +02:00
Olivier Goffart
cbc28b1f1b
Android: handle properly the Destroy event
...
Destroy means we need to exit the event loop.
And android_main will be called again from another thread, so we need to
support reseting the proxy
There is also a bug in the timer when exiting the app that this worked
around
Fix #6626
2024-10-23 14:30:55 +02:00
Simon Hausmann
a2eacd77f4
Minor cleanup: femtovg -> FemtoVG
2024-10-23 13:25:05 +02:00
Ian Hattendorf
687e4ce95b
PlatformBuilder::build() impl requires winit feature
2024-10-23 11:13:49 +02:00
Ian Hattendorf
3cc44dc670
Add version to OpenGLAPI
2024-10-23 11:13:49 +02:00
Ian Hattendorf
97927ccee9
Don't allow fallback in PlatformBuilder
...
If we're explicitly requesting a platform with specific properties, we
should fail to allow the caller to react accordingly.
2024-10-23 11:13:49 +02:00
Ian Hattendorf
dedd396093
Allow choosing renderer via PlatformBuilder
2024-10-23 11:13:49 +02:00
Ian Hattendorf
ac9b85049a
Add PlatformBuilder API to allow selecting OpenGL API
...
Right now this just allows selecting between OpenGL and OpenGL ES.
2024-10-23 11:13:49 +02:00
wu bobo
a590883a48
Fixes for older Android versions (6.0 to 9.0) ( #6622 )
...
Fixes #4936
ChangeLog: Support older android
2024-10-22 22:26:35 +02:00
DataTriny
28b5a67583
Implement accessible-delegate-focus
for the AccessKit backend
2024-10-22 12:54:00 +02:00
DataTriny
be62567293
Tell AccessKit that ListItem
s can be focused
2024-10-21 07:13:07 +02:00
Simon Hausmann
a4eb794e43
Fix missing redraws when embedding Slint into QWidget hierarchy
...
Commit 5718b15899
regressed this by
issuing the update on the window, which breaks when the widget is
embedded in a hierarchy (like a QGraphicsView). We really need to mark
the widget as dirty, even if that means we don't get frame throttling
then.
2024-10-17 16:45:16 +02:00
Arnold Loubriat
4621739cba
Implement selectable
and selected
properties in the AccessKit accessibility backend
2024-10-16 15:38:46 +02:00
Arnold Loubriat
19f09950c2
Changelog: Add accessible-selectable
and accessible-selected
properties
2024-10-16 15:38:46 +02:00
Tobias Hunger
df4f9b38ee
femtovg: Fix warning about deprecated web_sys::set_fill_style
...
Use set_fill_style_str insterad, it avoids constructing a JSValue
from a str.
2024-10-16 13:25:00 +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
bd99648021
LinuxKMS: Fix rendering with Mali drivers that use linear drm modifiers
...
Passing empty for FbCmd2Flags triggers a failing assertion that requires MODIFIERS to be set if the buffer in question has a modifier.
2024-10-07 17:17:30 +02:00
Simon Hausmann
95ee117897
Remove outdated comment
...
Amends commit 44f1602fd6
2024-10-07 16:14:11 +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
Enyium
054035d930
Set icon also as big winit window icon for increased compatibility (Windows-only).
...
Under Windows, the big icon is shown at least in the ancient Alt+Tab dialog, which can be restored via registry tweak.
2024-10-04 15:28:08 +02:00
Olivier Goffart
785c16c71a
bring_to_front should un-minimize the window
...
This helps for bringing the preview window back from minimized state
when clicking on "show preview" on X11
2024-10-04 10:06:02 +02:00
Simon Hausmann
f772cb8e11
live-preview: Bring the window to the front and focus it when the use… ( #6295 )
...
Fixes #196
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-09-24 17:05:03 +02:00
Simon Hausmann
b2873a3d17
ui-testing: Add support for reading the computed opacity of elements
...
This is useful when the UI shows for example labels that appear and the screenshot for referenceing is meant to be taken when the opacity animation is complete and the value is (near) 1.0.
2024-09-19 11:28:18 +02:00
Tobias Hunger
d1420969c7
winit: Quieten warning
...
I am getting this warning:
```
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
warning: missing documentation for a function
--> internal/backends/winit/lib.rs:83:1
|
83 | / pub fn create_gl_window_with_canvas_id(
84 | | canvas_id: &str,
85 | | ) -> Result<Rc<dyn WindowAdapter>, PlatformError> {
| |_________________________________________________^
|
note: the lint level is defined here
--> internal/backends/winit/lib.rs:6:9
|
6 | #![warn(missing_docs)]
| ^^^^^^^^^^^^
```
Fix this by adding a tiny bit of documentation
2024-09-18 18:45:14 +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
Simon Hausmann
c1863072a8
winit: Clean up backend creation API
...
Use a builder pattern, which also allows configuring the event loop builder.
Fixes #6103
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2024-09-16 10:11:00 +02:00
Simon Hausmann
a9cb255906
winit: Rename window_builder_hook to window_attributes_hook
...
In winit the WindowBuilder was renamed to WindowAttributes.
2024-09-16 10:11:00 +02:00
Arnold Loubriat
f01420258f
Changelog: Introduce AccessibleRole::ListItem
2024-09-16 09:15:39 +02:00
Arnold Loubriat
54992477d8
Changelog: Fix AccessKit role mapping for AccessibleRole::List
2024-09-16 09:15:39 +02:00
Simon Hausmann
5bfdfaf6c3
linuxkms: bump more dependencies
2024-09-13 17:30:19 +02:00
Simon Hausmann
44f1602fd6
Update drm/gbm dependencies
...
Fixes #3669
2024-09-13 16:10:10 +02:00
Simon Hausmann
d1c9d4e466
Minor tweak to framebuffer presentation error message in linuxkms backend
...
cc #4619
2024-09-12 13:50:30 +02:00
Simon Hausmann
d74e49e71f
Skia renderer: Remove unnecessary scale factor argument / function
2024-09-10 10:24:07 +02:00
Simon Hausmann
204cf7d0db
Fix wasm build
2024-08-28 21:24:42 +02:00
Simon Hausmann
394f1f0f91
Remove unused function
2024-08-28 21:24:42 +02:00
Simon Hausmann
16f47eac7d
Disable the macOS system menu bar for the Slint Live-Preview
...
Fixes #5962
2024-08-28 21:24:42 +02:00
Olivier Goffart
43c7f57b0f
spawn_local: initialize the platform if not initialized before the call
...
Take the opportunity to refactor a bit the way the global platform or
context is accessed
Fixes : #5871
2024-08-21 13:26:04 +02:00
Simon Hausmann
12f5343cd8
Add the window's root element handle to the window properties
2024-08-20 15:48:00 +02:00
Simon Hausmann
69e5a8a446
System Testing: Add descendent and element id/type/role matching messages
2024-08-20 15:48:00 +02:00
Tobias Hunger
e01da55c22
winit: Suppress warnings when building for WASM
...
I am not happy with the `allow(unused)`, but putting
`cfg(not(target_family = "wasm"))` was getting out of
hand.
2024-08-14 15:55:49 +02:00
Tobias Hunger
58e85ef317
winit: Suppress warning about web_sys_unstable_api
cfg
...
This is supposed to be set via `RUST_FLAGS` by users of our crate,
so allow it in `cfg`.
2024-08-14 15:55:49 +02:00
Olivier Goffart
666a892fa6
winit: Don't forward synthetic event to the application
...
Fixes #5823
2024-08-12 14:37:38 +02:00
Olivier Goffart
fae774c821
Android: workaround PollEvent::Wake not being recieved
...
We observe, in issue #5699 that the call to `AndroidAppWaker::wake`
doesn't always result in a `PollEvent::Wake` event.
So to work around that, always process event from any event we recieve
so that any timeout or input event would make sure event gets processed.
Closes #5699
2024-08-07 14:53:50 +02:00