fix: dash media lyrics overlapping
Apparently Behavior on model is a bad idea...
This commit is contained in:
parent
8107627737
commit
ba2d4f03d6
1 changed files with 20 additions and 19 deletions
|
|
@ -25,6 +25,7 @@ Item {
|
||||||
|
|
||||||
readonly property real fadeAmount: 0.1
|
readonly property real fadeAmount: 0.1
|
||||||
property bool flag
|
property bool flag
|
||||||
|
property list<string> lyricList: Lyrics.lyrics
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: Mask {
|
layer.effect: Mask {
|
||||||
|
|
@ -236,7 +237,7 @@ Item {
|
||||||
displayMarginBeginning: anchors.topMargin
|
displayMarginBeginning: anchors.topMargin
|
||||||
displayMarginEnd: anchors.bottomMargin
|
displayMarginEnd: anchors.bottomMargin
|
||||||
|
|
||||||
model: Lyrics.lyrics
|
model: root.lyricList
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
currentIndex = Qt.binding(() => {
|
currentIndex = Qt.binding(() => {
|
||||||
model; // Force update when lyrics change
|
model; // Force update when lyrics change
|
||||||
|
|
@ -285,28 +286,28 @@ 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Behavior on lyricList {
|
||||||
|
SequentialAnimation {
|
||||||
|
Anim {
|
||||||
|
target: lyrics
|
||||||
|
property: "opacity"
|
||||||
|
to: 0
|
||||||
|
type: Anim.DefaultEffects
|
||||||
|
}
|
||||||
|
PropertyAction {}
|
||||||
|
Anim {
|
||||||
|
target: lyrics
|
||||||
|
property: "opacity"
|
||||||
|
to: 1
|
||||||
|
type: Anim.SlowEffects
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue