Olivier Goffart
c0f346fdf7
Rust docs: have a macro to make link to the Slint doc
2024-12-12 16:44:31 +01:00
Olivier Goffart
a3dad45f0b
Accessibility: rename a few properties after API review:
...
- Rename `accessible-selectable` and `accessible-selected` to `accessible-item-{selectable,selected}`.
Because the property is for items in list rather than eg Text
- Rename `accessible-position-in-set` to `accessible-item-index`.
- Rename `accessible-size-of-set` to `accessible-item-count` and move
the property to the container element rather than the item itself
2024-12-07 08:25:42 +01:00
teknalb
0f72791977
winit: Auto disable maximize button when window resize is disabled ( #6997 )
...
Fix #5565
ChangeLog: winit: Auto disable maximize button when window resize is disabled
2024-12-07 07:41:03 +01:00
Simon Hausmann
e074d05847
Fix panic in accesskit when focus change occurs before initial tree u… ( #6952 )
...
This is a prospective fix to avoid sending `tree: None` as the first tree update.
Fixes #6015
2024-12-06 10:53:28 +01:00
Olivier Goffart
6b5fc7c250
Janitor: Remove dead code
2024-12-05 15:17:04 +01:00
FloVanGH
0d1412afc5
removed skip-taskbar property from window ( #6982 )
2024-12-03 10:07:36 +00:00
Simon Hausmann
37f66789c5
macOS: Replace use of old apple creates with modern objc2 replacements
2024-11-28 10:00:24 +01:00
Simon Hausmann
0d7f4ecc1d
Fix borrow_mut() panic in accesskit code when accesskit requests setting focus to an item
...
... which in turn requires a tree update with the new focus node, which requires &mut self.
Fixes #6922
2024-11-27 13:12:10 +01:00
FloVanGH
712f930897
windows: added skip_taskbar ( #6911 )
...
* Update internal/backends/winit/winitwindowadapter.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/backends/winit/winitwindowadapter.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update docs/src/content/docs/reference/window/window.mdx
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-11-27 09:55:11 +00:00
Arnold Loubriat
12e7b8019d
Update accesskit to 0.17 and accesskit_winit to 0.23
2024-11-24 13:36:06 +01:00
Simon Hausmann
1888e58735
Add API to set the XDG app id
...
ChangeLog: Added function to set the XDG app id on Wayland/X11. This needs to be added with respective function names in the language sections.
Fixes #1332
2024-11-22 11:24:06 +01:00
Simon Hausmann
05a309c86c
Clean up winit window creation on startup
...
Create the window adapter first without a window, and then resume. This deduplicates code and means that there's now only one single place where we resume/create the renderer and
accesskit adapters.
2024-11-21 13:27:30 +01:00
Simon Hausmann
ea6e5b2841
Fix accesskit adapter lifecycle
...
Let the adapter live as long as we have a winit window.
2024-11-21 13:27:30 +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
Simon Hausmann
7e3747041f
Fix simulator build
...
Amends ac9b85049a
2024-10-23 19:18:57 +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
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
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
Arnold Loubriat
4621739cba
Implement selectable
and selected
properties in the AccessKit accessibility backend
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
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
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
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
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
Simon Hausmann
11ce002314
macOS: Fix windows not resizing/redrawing correctly when showing again after calling hide
...
Don't assume that any pending redraw request will be delivered when the window his shown/hidden.
Amends 9113b877bd
Fixes #5658
2024-07-23 13:35:35 +02:00
Simon Hausmann
28f7ee7c7d
winit: Prefer X11 over Wayland when running in WSL
...
This is a workaround for the compositor on WSL tending to crash.
Unfortunately we can't just try to create an event loop with x11 first
and then re-try with wayland, winit doesn't allow that. So just avoid
wayland for now.
The long term solution #5667
Fixes #5657
2024-07-22 14:12:14 +02:00
Simon Hausmann
0be2d4521e
API Review: Remove suspend/resume related functions from FemtoVG renderer
...
This could've been `set_opengl_context` taking an `Option`, but it turns
out that makes for an awkward interface when wanting to pass None,
because that also then requires a dummy type for the OpenGL context even
though none is wanted.
2024-07-08 12:23:56 +02:00
Simon Hausmann
89b80eb00e
API review: move {window,display}_handle_06_rc() into WindowAdapterInternal
2024-07-05 20:48:02 +02:00
Olivier Goffart
7c93c7438b
Rename resize-border => resize-border-width
2024-07-05 12:50:16 +02:00
Noah Sweilem
6095398374
Winit window event filter ( #5531 )
...
* Add winit window event filter (#3066 )
* Winit window event filter changelog entry
* Format fixes
* More format fixes
* Make requested changes
- Callback gets a ref to the Slint window
- Callback returns an enum
- Callback is no longer `Send`
* Format fixes
* More format fixes
* Merge conflict fixes
* Rename members of `WinitWindowEventResult`
Closes #3066
2024-07-04 17:41:57 +02:00
Simon Hausmann
1ab68d53ed
winit: remove unnecessary helper function to access winit window
2024-07-03 18:01:48 +02:00
Simon Hausmann
cc1038baf8
Oops, fix non-wasm build
2024-07-03 16:06:47 +02:00
Simon Hausmann
c1e1a81b93
Fix some wasm build warnings
2024-07-03 15:46:28 +02:00
Simon Hausmann
38bc37f72a
Add missing dispatch of resize event to the window item when the user resizes the window while being hidden
2024-07-03 14:22:30 +02:00