This is the counter-part, which removes focus from the element if it's currently focused. The window - if focused - may still be focused towards the windowing system.
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"
Add a `raw-window-handle-06` feature to the Rust API crates, which adds support for version 0.6 of rwh to slint::Window, by delegation adding a `window_handle()` function that returns a struct that implements the corresponding traits from rwh.
HasDisplayHandle could also be provided on the backend, but that can be
done separately if needed.
This is only implemented for the winit backend right now.
cc #877
For native PopupWindow (qt backend) instead of relying on the destructor
to close the popup (usually in the next event loop, if no one had a hold
on any ComponentRc from the popup) do call set_visible(false) so the
popup can be hidden immediatly
CC: https://github.com/slint-ui/slint/discussions/4532#discussioncomment-8366080
Notmaly the geometry is set in WindowInner::show()
But when calling set_component on an existing window, this is not
called.
This Fixes the slint-viewer reloading with the software renderer.
Otherwise, programatic changes to the text are not told to the input
methods.
This is important in the case of the todo example on android.
For example if one type
`foo<enter>bar`, the enter will cause foo to be added in the list, and
the text will be cleared. But then when typing bar, the input method
things "foo" is still in the text and "foo" will be re-added
Move the set_fullscreen function added to the WindowAdapter trait in 779aff0b39
to be a function in WindowProperties instead.
That way it'll be easier in the future to extend this with other window states without
having to modify or break the WindowAdapter trait API.
I get warnings about unused members using the nightly compiler, one for
each member in all structs that derive the `FieldOffsets` macro. That is
a lot.
This fixes that as well as the one occurrence of that same warning in
unrelated code.
... for non-native PopupWindow.
We first need to handle the grabbed event regardless of popup window.
Then, if we are outside of the popup window, we should send exit events
so that, for example, the has-hover and mouse cursor get properly
updated.
Fixes#3934
The ComponentContainer is usually instentiated when trying to evaluate a
property such as the geometry or moving the focus. But the init code of
the ComponentContainer would then tries to change the focus which will
indirectly re-visit items and recurse into some property which are being
evaluated.
We do not need to set the focus on instentiation of the
ComponentContainer anyway, intentiating it shouldn't change the current
focus.
This fixes the LSP preview crashing when trying to preview a component
that has forward-focus
Fixes: #3950
Both structure are bascially the same and only used internally, no need
to have the two.
The only difference was that one had the modifiers and the other one
not. But we can just set the modifier at the point we were converting
between the two.
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
and their related name.
Also move the component module in the item_Tree module
register_component -> register_item_tree
ComponentItemTree -> ItemTreeNodeArray
For #3323
Rationale from that issue:
Right now, we use the term `component` in the Slint language and in the compiler to be a a tree of elements that can be used as an element in a .slint file.
The term is also currently used in the runtime as a tree of runtime Items that are allocated together. (declared in ComponentVTable)
But there are no 1 to 1 mapping between a `component` in the slint language, and a runtime Component.
(for example, the items behind a `if` or `for` or `PopupMenu` are in a different runtime component. And `component` declared in Slint are often inlined)
So we should rename the internal runtime `Component` to `ItemTree`
The currently public `slint::ComponentHandle` wraps the "root" of the ItemTree, but that's ok because it is generated from a .slint `component`, so it doesn't change name
- From C++, always call the Window::show() and hide() function instead
of going through set_visible directly as it doesn't set the size of
the WindowItem
- show() should also call resize on the renderer
- remove the is_visible in the WindowAdapterInternal as it is no longer
needed
... and provide hints in there about implementing window close requests.
Note: The links to set_size() and set_position() are not resolved, as
these virtual functions are still missing from the WindowAdapter base
class.
show() now let's Slint maintain a strong reference to the component, so
that it's easy to create new windows without having to do an awkward
dance around keeping the component alive.
Closes#3328