|
|
@@ -318,7 +318,7 @@ export struct LocalMusic {
|
|
|
.setLeftIconWidth(25)
|
|
|
.setLeftIconHeight(25)
|
|
|
.setTitleName('首页')
|
|
|
- .setTitleFontSize(19)
|
|
|
+ .setTitleFontSize(18)
|
|
|
.setTitleFontColor(Color.White)
|
|
|
.setTitleBarBackground($r('app.color.title_bar_bg'))
|
|
|
.setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
|
@@ -366,7 +366,17 @@ export struct LocalMusic {
|
|
|
this.sortType = PreferencesUtil.getNumberSync(SettingPage.SORT_TYPE, 4)
|
|
|
this.isCustomizeBg = PreferencesUtil.getBooleanSync(SettingPage.IS_CUSTOMIZE_BG, false)
|
|
|
this.customizeBgPath = PreferencesUtil.getStringSync(SettingPage.IS_CUSTOMIZE_BG_PATH, '')
|
|
|
+ if(this.isCustomizeBg){
|
|
|
+ this.titleBarModel.setRightTitleBackground(Color.Transparent)
|
|
|
+ this.titleBarModel.setTitleBarBackground(Color.Transparent)
|
|
|
+ this.titleBarModel.setTitleBarBottomLineColor(Color.Transparent)
|
|
|
+ this.titleBarModel.setLeftTitleBackground(Color.Transparent)
|
|
|
|
|
|
+ }else{
|
|
|
+ this.titleBarModel.setTitleBarBackground($r('app.color.title_bar_bg'))
|
|
|
+ this.titleBarModel.setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
|
+ this.titleBarModel .setRightTitleBackground($r('app.color.title_bar_bg'))
|
|
|
+ }
|
|
|
|
|
|
Utility.getAppName(getContext(this)).then((appName: string) => {
|
|
|
this.appName = appName
|
|
|
@@ -449,6 +459,16 @@ export struct LocalMusic {
|
|
|
this.sortType = PreferencesUtil.getNumberSync(SettingPage.SORT_TYPE, 4)
|
|
|
this.isCustomizeBg = PreferencesUtil.getBooleanSync(SettingPage.IS_CUSTOMIZE_BG, false)
|
|
|
this.customizeBgPath = PreferencesUtil.getStringSync(SettingPage.IS_CUSTOMIZE_BG_PATH, '')
|
|
|
+ if(this.isCustomizeBg){
|
|
|
+ this.titleBarModel.setTitleBarBackground(Color.Transparent)
|
|
|
+ this.titleBarModel.setTitleBarBottomLineColor(Color.Transparent)
|
|
|
+ this.titleBarModel.setRightTitleBackground(Color.Transparent)
|
|
|
+ this.titleBarModel.setLeftTitleBackground(Color.Transparent)
|
|
|
+ }else{
|
|
|
+ this.titleBarModel.setTitleBarBackground($r('app.color.title_bar_bg'))
|
|
|
+ .setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
|
|
|
+ .setRightTitleBackground($r('app.color.title_bar_bg'))
|
|
|
+ }
|
|
|
|
|
|
this.doUpdateData()
|
|
|
}
|
|
|
@@ -1673,12 +1693,10 @@ export struct LocalMusic {
|
|
|
Line().width('100%').height('100%')
|
|
|
}
|
|
|
.height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
|
|
|
- .backgroundColor($r('app.color.title_bar_bg'))
|
|
|
+ .backgroundColor(this.isCustomizeBg?Color.Transparent:$r('app.color.title_bar_bg'))
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
|
|
|
TitleBar({ model: $titleBarModel })
|
|
|
.id('pup_positon_music')
|
|
|
- .backgroundColor($r('app.color.title_bar_bg'))
|
|
|
- .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
|
|
|
Stack() {
|
|
|
Column() {
|
|
|
|
|
|
@@ -1831,7 +1849,8 @@ export struct LocalMusic {
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
.backgroundImage(this.isCustomizeBg?this.customizeBgPath:$r('app.color.bottom_control_background'))
|
|
|
- .backgroundImageSize({ height: '100%', width: '100%' })
|
|
|
+ .backgroundImageSize({ height: '100%'})
|
|
|
+ .backgroundImagePosition(Alignment.Center)
|
|
|
// .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
|
|
|
|
|
|
@@ -2979,12 +2998,13 @@ export struct LocalMusic {
|
|
|
.fontSize(13)
|
|
|
.textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
.maxLines(1)
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
.fontWeight(500)
|
|
|
Row() {
|
|
|
Text(this.currentSong?.artist)
|
|
|
.margin({ top: 2 })
|
|
|
.fontSize(11)
|
|
|
- .fontColor('#4D000000')
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
}
|
|
|
}
|
|
|
.alignItems(HorizontalAlign.Start)
|
|
|
@@ -4740,6 +4760,7 @@ export struct LocalMusic {
|
|
|
Row() {
|
|
|
Text(this.currentSong?.artist !== undefined ? this.currentSong?.artist : '')
|
|
|
.fontSize(10)
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
.padding({ top: 8 })
|
|
|
.fontColor(this.currentLyricColor)
|
|
|
.margin({ left: this.currentLyricAlignMode === 0 ? 18 : 0 })
|
|
|
@@ -6065,7 +6086,7 @@ export struct LocalMusic {
|
|
|
searchCover(title: string, artist: string) {
|
|
|
|
|
|
|
|
|
- NetAxiosUtil.getLyricCover(title, artist).then(async (res) => {
|
|
|
+ NetAxiosUtil.getLyricCover(title, artist, PreferencesUtil.getStringSync('COVER_API','')).then(async (res) => {
|
|
|
|
|
|
LogUtil.debug("onecold res =" + res)
|
|
|
if (StrUtil.isNotEmpty(res) && res !== 'unknown' && res !== 'Timeout was reached') {
|