In the new language, we plan to center the element within their parent,
so for compatibility, add explicit x and y binding putting them back in
the corner
Fixes the bug that caused the TextEdit in the gallery to sometimes be
empty.
Generated default value without any priority means it should not be
taken against a real binding if set
Limit the dependency tree of things like the interpreter or the C++ compiler that
doesn't support it anyway.
It is still enabled inconditionally in slint-build though
The test was only failing in some cases with node because of the
inlining in the interpreter, and it depended in which order the property
were processed (they were in a hash)
A test property was added to also test the interpreter
When having a binding such as
```
foo <=> bar
```
The default value will always be the value of `bar` regardless what's
the value of foo.
This change of behavior is the only one that makes sense bacause if we
are having repeater or if, this will be a problem. eg:
```
property <xxx> bar;
if (some_cndition) : SomeElement {
foo <=> bar;
}
```
Then we can't possibly take the default value of foo for the value of
bar since it depends on the condition. (and it is even worse in case of
repeater)
This is a change of behevior, this is why the tests have changed. The
cse of tests/cases/bindings/* were already covered by a warning since
0.3.0 so that should be fine. But the warning did not trigger for
builtin property such as `visible` (eg, input/visible_mouse test)
Also some internal two way bindings had to be reversed.
cc: #1394
Permit the style metrics to provide a `default-font-size` and bind that
to the `Window` if set. If not provided, then the backend can set a
`default-font-size`. By ensuring that the value is non-zero at run-time,
we can later introduce a rem unit that can act as factor relative to
this non-zero font size.
Now it's also possible to toggle checked by click on the text of the CheckBox similar to fluent design
GroupBox now respect the minimum width of the title, to avoid elision
Adopt SpinBox: set focus when buttons are clicked #1795 on md SpinBox
Olivier found the following steps that reproduce the crash with Skia:
1. Open the gallery and select the "Text Edit" tab.
2. In the first text edit widget, select the first three letters.
3. Click into the second text edit (while the first one shows the selected text)
4. At the beginning of the text, insert the letter "ù" a few times.
This sequence would result in the cursor_position property get out of
sync. Since it represents a byte offset in the utf-8 text, it would
point straight into a utf-8 sequence, resulting in a panic when the
renderer would try to create a slice of the selected text.
As a remedy, this patch renames the cursor_position and anchor_position
properties and provides wrapper getter accessors for use within the
TextInput to safely bound the stored offset.
Eventually we need to intercept changes to the text property and adjust
the cursor and anchor position properties accordingly, so that they
remain valid. However this requires that the compiler is aware that a
property is not accessible directly but has a setter that needs to be
called instead.
This likely/hopefully also fixes#1707.