The rust_window is initialized shortly after the constructor is
finished, but changeEvent can happen before that/
The warning can be shown in the log of #4803 (but that is not the cause of the bug)
If border-width == with or height of the rectangle we're trying to draw,
we will end up drawing an empty rectangle as we substract border-width/2
from both sides.
Rectangle with border-width bigger than half the size of the rectangle
don't make sense anyway, as it is fully covered by the border. So limit
the size of the border to half the size of the rectangle
The trick is that the backend selector build by default with the
i-slint-backend-qt, but the "enable" feature is only enabled if the
qt-backend feature is enabled explicitly, or on linux from the slint
or slint-interpreter crate
Fixes#4500
When the WindowAdaptor is dropped, deleteLater is used on the C++ QWidget.
On wayland, we still recieve a mouse exit event when the widget is about
to be deleted. This calls a callback into the deleted Rust WindowAdaptor.
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.
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.
The name passed was always "Slint", which can show up in the task
switcher, as seen on Linux/Xfce. Instead, we now use std::env::args() to
pass the actual first argument.
I think ideally this should use std::env::args_os() since we don't need
the data to be valid unicode (in which case this will panic). However,
stable Rust does not appear to provide a way to get at the bytes of an
OsString.
Silence this warning:
```
warning: i-slint-backend-qt@1.3.0: qt_window.rs:1536:17: warning: ignoring temporary created by a constructor declared with 'nodiscard' attribute [-Wunused-value]
```
* 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
This moves most of the version information we need to update into one
place.
Note that the workplace dependency features are in *addition* to any
feature set when using the workspace dependency. So we have all
workspace dependencies defined with `no-default-features = true`.