|
@@ -290,13 +290,8 @@ export struct LyricView2 {
|
|
|
NormalLyricLine(item: LyricLine, index: number) {
|
|
NormalLyricLine(item: LyricLine, index: number) {
|
|
|
Column(){
|
|
Column(){
|
|
|
Text(item.text)
|
|
Text(item.text)
|
|
|
- .fontSize(this.textSize)
|
|
|
|
|
|
|
+ .fontSize(index == this.currentIndex ?this.textSize*this.controller.getHighlightScale():this.textSize)
|
|
|
.textAlign(this.alignMode == 'center' ? TextAlign.Center : TextAlign.Start)
|
|
.textAlign(this.alignMode == 'center' ? TextAlign.Center : TextAlign.Start)
|
|
|
- .scale({
|
|
|
|
|
- x: index == this.currentIndex ? this.controller.getHighlightScale() : 1,
|
|
|
|
|
- y: index == this.currentIndex ? this.controller.getHighlightScale() : 1,
|
|
|
|
|
- centerX: this.alignMode == 'center' ? '50%' : 0
|
|
|
|
|
- })
|
|
|
|
|
.fontColor(index == this.currentIndex ? this.textHighlightColor : this.textColor)
|
|
.fontColor(index == this.currentIndex ? this.textHighlightColor : this.textColor)
|
|
|
.fontWeight(index == this.currentIndex && this.isHighlightBold ? FontWeight.Bold : this.textWeight)
|
|
.fontWeight(index == this.currentIndex && this.isHighlightBold ? FontWeight.Bold : this.textWeight)
|
|
|
.animation({
|
|
.animation({
|
|
@@ -312,7 +307,7 @@ export struct LyricView2 {
|
|
|
.visibility(this.isSingleLine?
|
|
.visibility(this.isSingleLine?
|
|
|
(index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
(index >= this.currentIndex && index <= this.currentIndex + 1 ? Visibility.Visible : Visibility.None)
|
|
|
: Visibility.Visible)
|
|
: Visibility.Visible)
|
|
|
- .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'100%': '80%')
|
|
|
|
|
|
|
+ .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'95%': '80%')
|
|
|
|
|
|
|
|
// 中文翻译(整行显示)
|
|
// 中文翻译(整行显示)
|
|
|
if (item.translation) {
|
|
if (item.translation) {
|
|
@@ -335,7 +330,7 @@ export struct LyricView2 {
|
|
|
index == this.currentIndex ? BlendMode.DST_IN : undefined,
|
|
index == this.currentIndex ? BlendMode.DST_IN : undefined,
|
|
|
index == this.currentIndex ? BlendApplyType.OFFSCREEN : undefined
|
|
index == this.currentIndex ? BlendApplyType.OFFSCREEN : undefined
|
|
|
)
|
|
)
|
|
|
- .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'100%': '80%')
|
|
|
|
|
|
|
+ .width(this.alignMode == 'center' ? '100%' :index == this.currentIndex ?'95%': '80%')
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|