slint
slint copied to clipboard
Transition syntax `animate *` not work
C++ & Slint 1.7.0
In document, it says that syntax animate * { ... } used to animate all properties, but it actually not works.
With below code, it is expected to animate background change, but actually no animation.
export component Example inherits Window {
width: 100px;
height: 100px;
background: white;
area := TouchArea{}
states [
test when area.has-hover : {
background: black;
in {
animate * { duration: 1s; }
}
out {
animate * { duration: 1s; }
}
}
]
}
Thanks for the bug report. This was documented for a very long time as we intended for this to work, but it was never actually implemented it seems.
https://github.com/slint-ui/slint/blob/9c30cdaf3b2eff60e7cb6beeea1b734d835f3fc7/internal/compiler/object_tree.rs#L2365-L2366
This test is for the legacy (<1.0) transition syntax, and that check was not even implemented in the new transition syntax with in and out.