Don't merge a property with a global property if it has a change handler
as we can't mobe the change handler in the global
Fixes#7784
If two property are merged that each have a change handler, we must
merge the change handler. (Note that the order in which they are being
called is not deterministic)
Fixes#7747
Add two new float to string conversion methods that mimic
JavaScript's Number.toFixed() and Number.toPrecision().
They are implemented as no_mangle functions similar to the already
existing float to shared string conversion.
Closes#5822
There was an image like this:
```slint
height: 40px
Image {
width: parent.width;
height: self.source.height * 1px;
source: @image-url("....");
}
```
The `y` propery ended inlined like so:
`(40 - the_image.source.get().size().height)/float(2)`
but since height was `unsigned` the C++ rules means that the operation
happens as unsigned and we have an overflow. and `y` turned out to be
very big instead of slightly negative (for image whose height was larger
than 40)
This is required to fix closing popup with the Qt backend, as we use the
window_adapter as a hack to get the root window_adapter (as opposed to
the popup one)
(That function was only used for the ComponentContainer and was not
implemented for C++ before)
Note that this reinterpret a
`Option<slint::private_api::WindowAdapterRc>` to just a `WindowAdapterRc`
This is because `Option` is only forward declared in C++ as it is not
generaly `#[repr(C)]`, but we assume (and assert) the usage of a niche.
As reported in https://chat.slint.dev/public/pl/ihnwtdgp7fb75k4aj5ou3p4idc
During the second phase, anything that involve @children should already
have been processed, so there shouldn't be anything left to inline.
But the children insertion point may be pointing to the wrong location
if some items were moved around (eg because of the `clip`).
So work it around by not accessing the children array at that indax that
might be out of range.
Fixes#7724
`ContextMenu` -> `ContextMenuArea`
`ContextMenu` must have a `Menu` child.
`MenuItem` can no longer be put dirrectly in `MenuBar` and can no longer
have children
`Menu` is used now for sub menus
Apply similar logic as to LineEdit and TextEdit, so that when folks build their own text input widgets, they're accessible by default. Also fixed the docs while at it to mention default applications.
Amends #7669
Enable the SDF feature by default in our compiler binaries
(Still disabled by default for other users because it takes up compile
time for something they probably don't need)
With usual copy/paste entries
We need to make sure that showing the popup window don't clear the
selection in the TextInput which happens if the TextInput gets a
FocusOut event.