fix: anim between lyrics changes

This commit is contained in:
2 * r + 2 * t 2026-05-05 02:38:31 +10:00
parent 0ab1b1e545
commit 8eb9f100d4

View file

@ -241,7 +241,7 @@ Item {
model: Lyrics.lyrics
Component.onCompleted: {
currentIndex = Qt.binding(() => {
Lyrics.lyrics; // Force update when lyrics change
model; // Force update when lyrics change
return Lyrics.indexForTime(Players.active?.position ?? 0);
});
positionViewAtIndex(currentIndex, ListView.Center);
@ -287,6 +287,24 @@ Item {
}
}
Behavior on model {
SequentialAnimation {
Anim {
target: lyrics
property: "opacity"
to: 0
type: Anim.DefaultEffects
}
PropertyAction {}
Anim {
target: lyrics
property: "opacity"
to: 1
type: Anim.SlowEffects
}
}
}
Behavior on opacity {
Anim {
type: Anim.SlowEffects