Bladeren bron

修复播放列表artist显示限制一行

onecold 10 maanden geleden
bovenliggende
commit
adbd1039ef
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4 1
      entry/src/main/ets/view/LocalMusic.ets

+ 4 - 1
entry/src/main/ets/view/LocalMusic.ets

@@ -7029,7 +7029,7 @@ export struct LocalMusic {
         Column() {
           Column() {
 
-            Text(item.name)
+            Text(this.isShowFileName?item.fileName :item.name)
               .fontSize(this.sonTwoFingerType == 1 ? 12 : this.sonTwoFingerType == 2 ? 15 : 18)
               .fontColor(this.curIndex === index ? this.themeColor :
                 this.isFrontWhite ? Color.White : $r('app.color.text_color'))
@@ -7052,6 +7052,8 @@ export struct LocalMusic {
               Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + '  ' + item?.album)
                 .fontSize(this.sonTwoFingerType == 1 ? 11 : this.sonTwoFingerType == 2 ? 12 : 14)
                 .padding({ top: 8 })
+                .maxLines(1)
+                .visibility(this.sonTwoFingerType == 2? Visibility.None : Visibility.Visible)
                 .fontColor(this.curIndex === index ? this.themeColor :
                   this.isFrontWhite ? $r('app.color.playlistText_color') : $r('app.color.text_color'))
                 .margin({ left: this.sonTwoFingerType == 3 ? 5 : 3 })
@@ -7059,6 +7061,7 @@ export struct LocalMusic {
               Text(item.size)
                 .fontSize(this.sonTwoFingerType == 1 ? 11 : this.sonTwoFingerType == 2 ? 12 : 14)
                 .padding({ top: 8 })
+                .maxLines(1)
                 .visibility(StrUtil.isEmpty(item.artist) ? Visibility.Visible : Visibility.None)
                 .fontColor(this.curIndex === index ? $r('app.color.title_bar_bg_text') :
                   this.isFrontWhite ? $r('app.color.playlistText_color') : $r('app.color.text_color'))