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
|
model: Lyrics.lyrics
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
currentIndex = Qt.binding(() => {
|
currentIndex = Qt.binding(() => {
|
||||||
Lyrics.lyrics; // Force update when lyrics change
|
model; // Force update when lyrics change
|
||||||
return Lyrics.indexForTime(Players.active?.position ?? 0);
|
return Lyrics.indexForTime(Players.active?.position ?? 0);
|
||||||
});
|
});
|
||||||
positionViewAtIndex(currentIndex, ListView.Center);
|
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 {
|
Behavior on opacity {
|
||||||
Anim {
|
Anim {
|
||||||
type: Anim.SlowEffects
|
type: Anim.SlowEffects
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue