|
|
@@ -222,6 +222,7 @@ export struct LyricView2 {
|
|
|
.contentEndOffset(this.h / 3)
|
|
|
.contentStartOffset(this.isUserTouching?this.h / 3:0)
|
|
|
.cachedCount(this.cacheSize)
|
|
|
+ .chainAnimation(true)
|
|
|
.animation({
|
|
|
curve: curves.springCurve(100, 10, 80, 10),
|
|
|
duration: 500
|
|
|
@@ -274,19 +275,19 @@ export struct LyricView2 {
|
|
|
.textAlign(this.alignMode == 'center' ? TextAlign.Center : TextAlign.Start)
|
|
|
.fontColor(index == this.currentIndex ? this.textHighlightColor : this.textColor)
|
|
|
.fontWeight(index == this.currentIndex && this.isHighlightBold ? FontWeight.Bold : this.textWeight)
|
|
|
+ .padding(this.isSingleLine?0:{ top:5,bottom:5 })
|
|
|
+ .visibility(this.isSingleLine?
|
|
|
+ (index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
|
+ : Visibility.Visible)
|
|
|
+ .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'95%': '80%')
|
|
|
.animation({
|
|
|
duration: 150,
|
|
|
curve: Curve.Linear
|
|
|
})
|
|
|
- .padding(this.isSingleLine?0:{ top:5,bottom:5 })
|
|
|
.blendMode(
|
|
|
index == this.currentIndex ? BlendMode.DST_IN : undefined,
|
|
|
index == this.currentIndex ? BlendApplyType.OFFSCREEN : undefined
|
|
|
)
|
|
|
- .visibility(this.isSingleLine?
|
|
|
- (index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
|
- : Visibility.Visible)
|
|
|
- .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'95%': '80%')
|
|
|
|
|
|
// 中文翻译(整行显示)
|
|
|
if (item.translation) {
|
|
|
@@ -298,10 +299,6 @@ export struct LyricView2 {
|
|
|
.fontWeight(index == this.currentIndex && this.isHighlightBold ? FontWeight.Bold : this.textWeight)
|
|
|
.padding(this.isSingleLine?{ bottom:2 }:{ bottom:5 })
|
|
|
.textAlign(this.alignMode == 'center' ? TextAlign.Center : TextAlign.Start)
|
|
|
- .animation({
|
|
|
- duration: 150,
|
|
|
- curve: Curve.Linear
|
|
|
- })
|
|
|
.visibility(this.isSingleLine?
|
|
|
(index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
|
: Visibility.Visible)
|
|
|
@@ -310,6 +307,10 @@ export struct LyricView2 {
|
|
|
index == this.currentIndex ? BlendApplyType.OFFSCREEN : undefined
|
|
|
)
|
|
|
.width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'95%': '80%')
|
|
|
+ .animation({
|
|
|
+ duration: 150,
|
|
|
+ curve: Curve.Linear
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -322,6 +323,10 @@ export struct LyricView2 {
|
|
|
index == this.currentIndex ? BlendMode.SRC_OVER : undefined,
|
|
|
index == this.currentIndex ? BlendApplyType.OFFSCREEN : undefined
|
|
|
)
|
|
|
+ .animation({
|
|
|
+ duration: index == this.currentIndex ?150:0,
|
|
|
+ curve: Curve.Linear
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -441,10 +446,10 @@ export struct LyricView2 {
|
|
|
(index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
|
: Visibility.Visible)
|
|
|
.padding(this.isSingleLine?0:{ top:5,bottom:5 })
|
|
|
- .shaderStyle(index == this.currentIndex ?{
|
|
|
- direction: GradientDirection.Right,
|
|
|
- colors: this.getWordByWordLyricLyricItemLinearGradient(item, word, index)
|
|
|
- }:undefined)
|
|
|
+ // .shaderStyle(index == this.currentIndex ?{
|
|
|
+ // direction: GradientDirection.Right,
|
|
|
+ // colors: this.getWordByWordLyricLyricItemLinearGradient(item, word, index)
|
|
|
+ // }:undefined)
|
|
|
.animation({
|
|
|
duration: 150,
|
|
|
curve: Curve.Linear
|