Olivier Goffart
9ff13faee8
Implement the quitting on windows close in i-slint-core and not in the platform
...
Step towards #1499
2024-01-08 21:17:52 +01:00
Olivier Goffart
503baf2898
internal: Move the backend global instance in a SlintContext
...
The SlintContext will hold all the thread_local state.
A small step in the direction of #4294
2024-01-08 21:17:52 +01:00
Simon Hausmann
2172f30ee7
Build docs for i-slint-backend-winit
2024-01-08 15:57:30 +01:00
Aurindam Jana
ae9ec50eef
Update index.html for docs
2024-01-08 15:25:31 +01:00
Olivier Goffart
b5032ca53f
winit: add a hook to adjust the winit::WindowBuilder
...
This is still internal API but can help for the case of
https://github.com/slint-ui/slint/discussions/4284 where this could be
used to call winit::WindowBuilder::with_titlebar_transparent or others
https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/macos/trait.WindowBuilderExtMacOS.html#tymethod.with_title_hidden
2024-01-08 15:17:34 +01:00
Simon Hausmann
138443fa8d
Add code signing for macOS tool binaries
...
This signs the slint-lsp/slint-viewer binaries as well
as the lipo'ed binary for the VS code extension.
cc #4240
2024-01-08 15:12:40 +01:00
Olivier Goffart
1c735e8707
issue_template.md: emphasis that questions goes to "discussions"
2024-01-08 15:04:56 +01:00
Simon Hausmann
dc2dad9b5f
doc: slint_lsp now also works on macOS
...
I've verified that locally.
cc #4240
2024-01-08 13:17:25 +01:00
Olivier Goffart
527d4dfeee
ChangeLog updates
2024-01-08 12:14:18 +01:00
Jason Birbal
8fde827055
Document dependencies and add figma_import in the workspace ( #4278 )
...
- Compile figma_import as part of the workspace
- Updated readme to reflect dependencies and workspace build instructions
2024-01-08 11:32:54 +01:00
Simon Hausmann
05079f79fb
doc: Fix typo
2024-01-08 10:08:05 +01:00
Simon Hausmann
a7d1ab89d7
Minor cleanup
...
Merge two functions that had only one call site.
2024-01-08 09:56:14 +01:00
Simon Hausmann
aadac60a07
doc: Fix title case
2024-01-08 09:42:57 +01:00
Olivier Goffart
e90dfdc41c
TextInput: fix focus and virtual keyboard behavior on press/release
...
I've tried to make sure the behavior match the one of native Window (and
Qt on Linux) apps, and android apps.
Windows set the focus on press, but android set the focus on release.
Also, the paste selection on middle click happens on release on Linux.
On android, when taping a text edit that currently has the focus,
we should show the virtual keyboard again if it was hidden by the user.
Having platform specific behavior like this in i-slint-core is not
optimal, but on the other hand, I'm not sure this deserve a new function
in the Platform trait
2024-01-07 12:42:13 +01:00
Simon Hausmann
982b4c806f
LinuxKMS: Add initial support for software rendering with Skia
...
This is the initial implementation based on DRM dumb buffers,
which cleans up various things at the same time:
- DRM output is separate from GBM and DRM dumb buffer displays.
The latter two re-use the former.
- The timer refresh for the Vulkan KHR Display rendering lives
now with the KHR display code, in hope to be replaced with a
better mechanism in the future.
What's missing still is support for partial updates as well as
rendering with our own software renderer.
2024-01-07 11:54:29 +01:00
Simon Hausmann
fd6d51528f
Attempt to use the 5.2 branch of the esp-idf container for the CI
2024-01-06 15:05:53 +01:00
Brandon Fowler
3e8940660b
Add set-selection-offsets
function to TextInput, TextEdit, and LineEdit ( #4197 )
...
The function accepts two arguments that specify the start and the end of the text to select.
Fixes #4164
2024-01-06 11:12:53 +01:00
Simon Hausmann
ed54581aa1
Fix support for creating context menus on mouse press
...
When bringing up a popup menu on mouse press,
don't close it on release if the pointer is inside.
2024-01-06 10:45:34 +01:00
Simon Hausmann
c5aebcfde3
Fix close behaviour of PopupWindow
...
- Close on release when the mouse pointer is inside the popup
- Close on press when click is outside
2024-01-06 10:45:34 +01:00
Olivier Goffart
a259eeff59
CI: prospective fix for esp-idf libc version invompatibility
...
xtansa rust 1.75 toolchain uses ubuntu 22.4, but the docker umage has ubuntu 20.4
Hopefully updating the docker image should fix the problem
2024-01-06 10:44:02 +01:00
Olivier Goffart
b90047599e
Android: Fix delete and backspace being inverted
2024-01-05 17:35:49 +01:00
Olivier Goffart
950ffb0041
Android: make the show/hide keyboard work with native-activity
2024-01-05 16:11:28 +01:00
Olivier Goffart
f495235b74
Android todo example: cleanup console output and remove warning
2024-01-05 16:11:28 +01:00
Olivier Goffart
4243040453
LSP: implement code action to add missing component import
2024-01-05 09:17:48 +01:00
Olivier Goffart
48180919da
ListView: ensure that we track change to the model
...
Fixes #3125
2024-01-05 09:17:19 +01:00
Olivier Goffart
64e7bb27d1
CI: add one job testing beta version of rust
2024-01-04 15:52:48 +01:00
Olivier Goffart
458302d431
Additional tests for double-clicking
...
Relates to #4235
2024-01-04 14:38:43 +01:00
Simon Hausmann
8193d4d064
LinuxKMS: Clean up internal page flip callback API
...
Remove the hack of calling present() from our swap_buffers() forwarder (and let it really only forward),
and instead call it explicitly through the shared egl_display member.
The way we can pass along the callback instead of storing it separately.
2024-01-04 10:35:40 +01:00
Simon Hausmann
f5bf6e5dc0
Skia: Clean up pre present notify callback API
...
Move this back out of render() again and make it stateful in the renderer. Reduces the amount of book-keeping required and it's always the same callback anyway.
2024-01-04 10:35:09 +01:00
Simon Hausmann
41bfe66447
Bump AccessKit dependencies
...
This brings lazy initialization of the accesskit adapter on Linux/dbus.
cc #3867
2024-01-04 10:00:55 +01:00
Simon Hausmann
3069e8e503
Add support for frame throttling on Wayland
...
Use winit's pre_present_notify() API to allow for the compositor to throttle rendering.
Fixes #4200
cc #1695
2024-01-04 09:21:53 +01:00
Simon Hausmann
0c4177794e
doc: hide private interfaces of the FemtoVG renderer
2024-01-03 17:48:41 +01:00
Olivier Goffart
ee996f260f
CI: Documentation for i-slint-backend-android-activity
2024-01-03 16:29:03 +01:00
Olivier Goffart
c4a91982db
Janitor: fix docs links
2024-01-03 16:29:03 +01:00
Olivier Goffart
2ff9399e04
Slintpad: resize the cansvas after showing the UI
...
Right now, the winit window adaptor will force a px value on the width
and height once the ui is up.
We should then override that again with 100% after the UI is shown
2024-01-03 15:38:06 +01:00
Olivier Goffart
a3e3cccf0c
Todo Android example: state saving/restore
2024-01-03 14:26:48 +01:00
Simon Hausmann
d0616f31fb
winit: Remove hack that makes request_redraw() during draw() work
...
Calling request_request() during RedrawRequested would not work on
Windows and wasm. Commit 372e6b0ffc
worked
around this, but that can be reverted now, as this is fixed in winit.
For windows that was https://github.com/rust-windowing/winit/pull/3165
and for wasm I couldn't find the change, but could verify that it still
works.
I checked that #1574 does not regress.
Besides the cleanup, this is also needed for #1695 .
2024-01-03 10:23:34 +01:00
Simon Hausmann
692a8bc6b3
Synchronize features among different binary packages
...
Enable software renderer explicitly also for the tool binaries.
2024-01-02 17:42:23 +01:00
Olivier Goffart
96324a8300
Fix property wrongly considered as const if it is modified through an alias
...
Fixes #4241
2024-01-02 17:36:22 +01:00
Miłosz Kosobucki
a4f2b45d9a
Enable Skia renderer for C++ package
...
It's not enabled by default due to complicated build setup but on
GitHub Actions it works.
2024-01-02 16:02:08 +01:00
Simon Hausmann
f673e45b73
Add lsp and viewer binaries for macOS to the release
...
As discussed, make the binaries available. There's signing work to be done for them, but otherwise they're ready (or should be :).
cc #4240
2024-01-02 15:43:22 +01:00
Simon Hausmann
25579ab068
winit: Fix FocusScope
's key-released
not being invoked when releasing the space bar key
...
Upon pressing, event.text is set and all is well. But when the space bar is released, event.text is always
empty and we would not dispatch an event.
2024-01-02 15:29:24 +01:00
Simon Hausmann
5f69857926
Fix missing font fallback handling on Windows when pre-rendering glyphs for the software renderer ( #4245 )
...
Add some symbol/emoji fonts for Windows, next to the existing options for macOS and Linux.
2024-01-02 13:37:08 +01:00
Olivier Goffart
6ca9a9b884
SpinBox: enabled by default
2024-01-02 12:11:41 +01:00
Olivier Goffart
7aab16ac70
slint-tr-extractor: fix plural form
...
Fix #4238
2024-01-02 12:11:18 +01:00
Simon Hausmann
55e3a0418a
Fix typedoc warning about unused parameters
2024-01-02 10:58:18 +01:00
Olivier Goffart
ba738be0a7
LSP preview: fix some issue related to geometry
...
- make sure that the initial size is proper by calling show() on the preview ui
after the factory has been set
- ensure that there is no recursion if the inner layout info depends on the size
(Fixes #3989 )
- Ensure that the geometry constraints are respected when previewing a component
that was already resized
2024-01-02 10:48:12 +01:00
Simon Hausmann
617d0921ca
Fix Switch element in Cupertino & Fluent style not showing text when font size is large
...
Take the minimum height of the layout into account, like in the material style implementation.
Fixes #4201
2024-01-02 10:07:03 +01:00
Olivier Goffart
c5be0ec8aa
LSP preview: workaround the resize handler not working
...
If resizing makes the value of is-resizable dirty, we would hit issue #3953
and the handle would be re-created and the drag operation aborted
2024-01-02 09:56:54 +01:00
Olivier Goffart
01e6429bfa
Janitor: fix warning about unused import in Rust 1.75
...
Prospective fix for the CI breaking with Rust 1.75
2023-12-29 14:40:02 +01:00