fix: anim between lyrics changes
This commit is contained in:
parent
0ab1b1e545
commit
8eb9f100d4
1 changed files with 19 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue