This also fix changed event not working as they rely on the init to the setup
Fixes#6836
ChangeLog: fix init and changed callback not always being called in ListView
the deduplicate_property_read was bailing out the replacement if one
part of the coinditional branch do assignment. But the other part might
already have partial assignment, so we must continue
Fixes#6616
The "tmpobj" variable was overwriten because the interpreter (contrary
to rust and C++) don't have scopes for the local variables, and local
variable of the same name would conflict.
(I think this could in theory be a problem in C++ and rust although i
haven't reproduced it)
Other uses of StoreLocalVariable also make the number unique with a
counter
Fixes#6721
Popups are stored in a HashMap and are assigned an ID so popup.close(); closes the correct popup and so a single PopupWindow cannot be opened multiple times
Fixes#4356
Still not perfect:
- Calling several times `popup.show()` on the same popup, will open
that popup multiple times (instead of being a noop once opened)
- Calling `some-popup.close()` will always close the top of the stack,
without considering if it is the `some-popup` or another popup.
Both problems are because we don't remember whether a particular popup
is open and we don't associate `close()` with a particular popup
This currently doesn't have public API to enable it yet.
TODO:
- Error handling in the compiler
- Public API in the compiler configuration
- Documentation
The struct held provides access to the design metrics of the font scaled
to the font pixel size used by the element.
ChangeLog: Slint Language: Added font-metrics property to `Text` and `TextInput`.
Closes#6047
- Remove the duration threshold
- Always register the swipe even if the pointer went in another
direction before
- set the current position on the release event (in case there was no
mouve to that position before)
ChangeLog: adjusted threshold in the SwipeGestureHandler
Closes#6344
Probably also helps for #6350
If the property was not used, it was optimized out and the compiler
would panic
Fixes#6331
ChangeLog: compiler: Fix changed callback of an unused property
The origin of this proposal is the name of the `swipe-left`, etc.
directional, boolean properties. They're missing another verb in their
name. In principle the right choice would be "recognize". That is what
the type name suggests, that's the term the documentation uses, so the
code should read `recognize-swipe-left: true;`. However that is a long
word. "Handle" is a verb that's simpler. It's also more generic (that's
a downside), but it's otherwise short enough to make things look
"right":
```
SwipeGestureHandler {
handle-swipe-left: true;
swiped => { something.naviate-left(); }
}
```
Therefore this patch proposes to rename the type to SwipeGestureHandler
and prefixes the boolean directional properties with "handle".
This is consistant so that `width: 100%` is the same as `width: parent.width`
This basically revert the previous commit that was just working around
the debug_assert to actually fix the behavior
ChangeLog: width and height expressed in `%` unit for an element in a
Flickable now refer to the size of the Flickable instead of that of
the viewport
The viewport of a flickable is of ElementType::Native, and `lookup_property`
don't query the builtin reserved properties in that case.
This commit fix the assert by allowing Type::Invalid as well.
Fixes#4163
We need to skip the generation of the local property so it directly
forward to the alias in the public property
Fixes#5855
ChangeLog: Fixed generated getter and setter of alias properties in globals
We need to give unique name to optimized item as well, otherwise the
properties ends up the same.
Also fix the optimized element and timer when inlining
Fixes#5977Fixes#5976
Because f64 has too much precision, so limit to f32 so that we don't
have extra precision we don't need and would be wrong as all our float
as in f32
(Also avoid double allocation in rust generated code)