|
|
@@ -567,7 +567,7 @@ export struct LocalMusic {
|
|
|
this.isShowTitleBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_TITLTBAR, true)
|
|
|
this.isShowAllBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_ALLBAR, true)
|
|
|
this.twoFingerType = PreferencesUtil.getNumberSync(SettingPage.TWO_FINGER_TYPE, 3)
|
|
|
- this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, true)
|
|
|
+ this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, false)
|
|
|
this.isCircleBtn = PreferencesUtil.getBooleanSync(SettingPage.IS_CIRCLE_BTN, false)
|
|
|
if (this.isSavePlayMode) {
|
|
|
this.playType = PreferencesUtil.getNumberSync('musicPlayType', 0)
|
|
|
@@ -6224,8 +6224,15 @@ export struct LocalMusic {
|
|
|
CoverInfo() {
|
|
|
Column() {
|
|
|
|
|
|
- // 第一个
|
|
|
- this.musicNameInfo(this.isCoverTop)
|
|
|
+ //如果是方形,判断是不是封面在顶部,如果不是顶部,显示musicNameInfo, 如果是圆形显示musicNameInfo
|
|
|
+ if(this.isCoverRectangle){
|
|
|
+ if(!this.isCoverTop){
|
|
|
+ this.musicNameInfo(false)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.musicNameInfo(false)
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
Stack() {
|
|
|
// 唱片旋转效果
|
|
|
@@ -6278,6 +6285,8 @@ export struct LocalMusic {
|
|
|
.onClick(() => {
|
|
|
this.getImageColor()
|
|
|
})
|
|
|
+
|
|
|
+ this.musicNameInfo(false)
|
|
|
}else{
|
|
|
Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
.height(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162)
|
|
|
@@ -6304,7 +6313,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
|
|
|
|
|
|
- this.musicNameInfo(!this.isCoverTop)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 唱针以左上角为点选择逆时针40度
|
|
|
@@ -6352,15 +6361,16 @@ export struct LocalMusic {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Builder
|
|
|
- private musicNameInfo(isTop:boolean) {
|
|
|
+ private musicNameInfo(isHidden:boolean) {
|
|
|
Column({ space: 8 }) {
|
|
|
Text(this.name)
|
|
|
.fontSize(this.name.length >= 28 || this.isCoverOpacity() ? 18 : 22)
|
|
|
.fontWeight(FontWeight.Bold)
|
|
|
.textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
.maxLines(1)
|
|
|
- .width(isTop?'80%':'99%')
|
|
|
+ .width('99%')
|
|
|
.textAlign(TextAlign.Center)
|
|
|
.fontColor(Color.White)
|
|
|
Text(this.artist + ' ' + this.currentSong?.album)
|
|
|
@@ -6368,12 +6378,12 @@ export struct LocalMusic {
|
|
|
.textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
.fontColor(Color.White)
|
|
|
.textAlign(TextAlign.Center)
|
|
|
- .width(isTop?'80%':'99%')
|
|
|
+ .width('99%')
|
|
|
.maxLines(1)
|
|
|
}
|
|
|
- .margin({ top: this.isCoverOpacity() ? 20 : isTop?40:20 })
|
|
|
+ .margin({ top: this.isCoverOpacity() ? 20 : isHidden?40:20 })
|
|
|
.zIndex(1)
|
|
|
- .visibility(this.isCoverOpacity()||isTop ? Visibility.None : Visibility.Visible)
|
|
|
+ .visibility(this.isCoverOpacity()||isHidden ? Visibility.None : Visibility.Visible)
|
|
|
}
|
|
|
|
|
|
@Builder
|