mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00

So animate x { ... } is basically a short-hand for PropertyAnimation { ... } <magically associated that animation with x whenever x is changed> We could also support a shared animation syntax in the future: blah := PropertyAnimation { ... } animate x with blah; animate y with blah; This patch also adds a primitive PropertyAnimation struct, which will be used by the generated code to collect the values specified in the .60 markup.
23 lines
343 B
Text
23 lines
343 B
Text
|
|
|
|
SuperSimple := Rectangle {
|
|
|
|
animate x {
|
|
duration: 1000;
|
|
}
|
|
|
|
animate x {
|
|
// ^error{Duplicated animation}
|
|
duration: 1000;
|
|
}
|
|
|
|
animate y {
|
|
nonexistent: 42;
|
|
// ^error{Unknown property nonexistent}
|
|
}
|
|
|
|
animate text {
|
|
// ^error{'text' is not an animatable property}
|
|
}
|
|
}
|
|
|