|
@@ -1374,32 +1374,53 @@ struct NewIndex {
|
|
|
.alignItems(VerticalAlign.Center)
|
|
.alignItems(VerticalAlign.Center)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 迷你播放条与 HiCar 模式复用同一个封面按钮,统一点击反馈与发光效果。
|
|
|
@Builder
|
|
@Builder
|
|
|
- playConLeft() {
|
|
|
|
|
- Row() {
|
|
|
|
|
- Stack({ alignContent: Alignment.Center }) {
|
|
|
|
|
- Image( StrUtil.isNotEmpty(this.currentSong?.pixelMapPath)?
|
|
|
|
|
- this.currentSong?.pixelMapPath:$r('app.media.alt'))
|
|
|
|
|
- .width(48)
|
|
|
|
|
- .height(48)
|
|
|
|
|
- .objectFit(ImageFit.Contain)
|
|
|
|
|
- .alt( $r('app.media.alt'))
|
|
|
|
|
- .fillColor(this.themeColor)
|
|
|
|
|
- .borderRadius(8)
|
|
|
|
|
- .shadow({
|
|
|
|
|
- radius: 15,
|
|
|
|
|
- type: ShadowType.BLUR,
|
|
|
|
|
- color: 'on_primary'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ private buildMiniPlayerCoverContent() {
|
|
|
|
|
+ Stack({ alignContent: Alignment.Center }) {
|
|
|
|
|
+ Image(StrUtil.isNotEmpty(this.currentSong?.pixelMapPath) ?
|
|
|
|
|
+ this.currentSong?.pixelMapPath : $r('app.media.alt'))
|
|
|
|
|
+ .width(48)
|
|
|
|
|
+ .height(48)
|
|
|
|
|
+ .objectFit(ImageFit.Contain)
|
|
|
|
|
+ .alt($r('app.media.alt'))
|
|
|
|
|
+ .fillColor(this.themeColor)
|
|
|
|
|
+ .borderRadius(8)
|
|
|
|
|
+ .shadow({
|
|
|
|
|
+ radius: 15,
|
|
|
|
|
+ type: ShadowType.BLUR,
|
|
|
|
|
+ color: 'on_primary'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(48)
|
|
|
|
|
+ .height(48)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ private miniPlayerCoverButton() {
|
|
|
|
|
+ PointLightContentButton({
|
|
|
|
|
+ pointColor: this.themeColor,
|
|
|
|
|
+ buttonRadius: 10,
|
|
|
|
|
+ pointLightHeight: 88,
|
|
|
|
|
+ pressScale: 0.92,
|
|
|
|
|
+ useShadow: false,
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.buildMiniPlayerCoverContent()
|
|
|
}
|
|
}
|
|
|
|
|
+ })
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(48)
|
|
.height(48)
|
|
|
.margin({ left: 5 })
|
|
.margin({ left: 5 })
|
|
|
.zIndex(3)
|
|
.zIndex(3)
|
|
|
- .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.9 })
|
|
|
|
|
.onClick((): void => {
|
|
.onClick((): void => {
|
|
|
this.collapseMiniPlayerToOrb()
|
|
this.collapseMiniPlayerToOrb()
|
|
|
})
|
|
})
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ playConLeft() {
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ this.miniPlayerCoverButton()
|
|
|
|
|
|
|
|
Column() {
|
|
Column() {
|
|
|
Text(this.currentSong?.name)
|
|
Text(this.currentSong?.name)
|
|
@@ -1437,29 +1458,7 @@ struct NewIndex {
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
|
private hiCarCoverControl() {
|
|
private hiCarCoverControl() {
|
|
|
- Stack({ alignContent: Alignment.Center }) {
|
|
|
|
|
- Image(StrUtil.isNotEmpty(this.currentSong?.pixelMapPath)?
|
|
|
|
|
- this.currentSong?.pixelMapPath:$r('app.media.alt'))
|
|
|
|
|
- .width(48)
|
|
|
|
|
- .height(48)
|
|
|
|
|
- .objectFit(ImageFit.Contain)
|
|
|
|
|
- .alt($r('app.media.alt'))
|
|
|
|
|
- .fillColor(this.themeColor)
|
|
|
|
|
- .borderRadius(8)
|
|
|
|
|
- .shadow({
|
|
|
|
|
- radius: 15,
|
|
|
|
|
- type: ShadowType.BLUR,
|
|
|
|
|
- color: 'on_primary'
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- .width(48)
|
|
|
|
|
- .height(48)
|
|
|
|
|
- .margin({ left: 5 })
|
|
|
|
|
- .zIndex(3)
|
|
|
|
|
- .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.9 })
|
|
|
|
|
- .onClick((): void => {
|
|
|
|
|
- this.collapseMiniPlayerToOrb()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.miniPlayerCoverButton()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|