|
@@ -74,7 +74,7 @@ export struct NavidromePage {
|
|
|
@State tabOptions: SegmentButtonOptions = SegmentButtonOptions.capsule({
|
|
@State tabOptions: SegmentButtonOptions = SegmentButtonOptions.capsule({
|
|
|
buttons: [{ text: '全部' }, { text: '艺术家' }, { text: '专辑' }] as SegmentButtonItemTuple,
|
|
buttons: [{ text: '全部' }, { text: '艺术家' }, { text: '专辑' }] as SegmentButtonItemTuple,
|
|
|
direction: Direction.Ltr,
|
|
direction: Direction.Ltr,
|
|
|
- buttonPadding: { top: 12, bottom: 12 },
|
|
|
|
|
|
|
+ buttonPadding: { top: 10, bottom: 10 },
|
|
|
backgroundColor: $r('app.color.index_background'),
|
|
backgroundColor: $r('app.color.index_background'),
|
|
|
selectedBackgroundColor: $r('app.color.start_window_background'),
|
|
selectedBackgroundColor: $r('app.color.start_window_background'),
|
|
|
selectedFontColor: $r('app.color.text_color'),
|
|
selectedFontColor: $r('app.color.text_color'),
|
|
@@ -490,7 +490,7 @@ export struct NavidromePage {
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.padding({ top: this.topRectHeight + 5 })
|
|
.padding({ top: this.topRectHeight + 5 })
|
|
|
- .backgroundColor($r('app.color.start_window_background'))
|
|
|
|
|
|
|
+ // .backgroundColor($r('app.color.start_window_background'))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
@@ -663,10 +663,13 @@ export struct NavidromePage {
|
|
|
.height(48)
|
|
.height(48)
|
|
|
.borderRadius(10)
|
|
.borderRadius(10)
|
|
|
.sourceSize({ width: 38, height: 38 })
|
|
.sourceSize({ width: 38, height: 38 })
|
|
|
|
|
+ .draggable(false)
|
|
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
+ .autoResize(true) // 重采样,可减少内存占用
|
|
|
.alt($r('app.media.music_red'))
|
|
.alt($r('app.media.music_red'))
|
|
|
.fillColor(song.pixelMapPath ? undefined : this.themeColor)
|
|
.fillColor(song.pixelMapPath ? undefined : this.themeColor)
|
|
|
.objectFit(ImageFit.Cover)
|
|
.objectFit(ImageFit.Cover)
|
|
|
- .margin({ left: 8 })
|
|
|
|
|
|
|
+ .margin({ left: 20 })
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.playSong(song, index, true);
|
|
this.playSong(song, index, true);
|
|
|
})
|
|
})
|
|
@@ -732,9 +735,13 @@ export struct NavidromePage {
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(48)
|
|
.height(48)
|
|
|
.borderRadius(10)
|
|
.borderRadius(10)
|
|
|
|
|
+ .draggable(false)
|
|
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
+ .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
+ // .sourceSize({ width: 38, height: 38 })
|
|
|
.fillColor(artist.coverUrl ? undefined : this.themeColor)
|
|
.fillColor(artist.coverUrl ? undefined : this.themeColor)
|
|
|
.objectFit(ImageFit.Cover)
|
|
.objectFit(ImageFit.Cover)
|
|
|
- .margin({ left: 8 })
|
|
|
|
|
|
|
+ .margin({ left: 20 })
|
|
|
|
|
|
|
|
Column({ space: 4 }) {
|
|
Column({ space: 4 }) {
|
|
|
Text(artist.name ?? Constants.UNKNOWN_ARTIST)
|
|
Text(artist.name ?? Constants.UNKNOWN_ARTIST)
|
|
@@ -774,9 +781,14 @@ export struct NavidromePage {
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(48)
|
|
.height(48)
|
|
|
.borderRadius(10)
|
|
.borderRadius(10)
|
|
|
|
|
+ .clip(true)
|
|
|
|
|
+ .draggable(false)
|
|
|
|
|
+ // .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
+ // .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
+ .sourceSize({ width: 38, height: 38 })
|
|
|
.fillColor(album.coverUrl ? undefined : this.themeColor)
|
|
.fillColor(album.coverUrl ? undefined : this.themeColor)
|
|
|
.objectFit(ImageFit.Cover)
|
|
.objectFit(ImageFit.Cover)
|
|
|
- .margin({ left: 8 })
|
|
|
|
|
|
|
+ .margin({ left: 20 })
|
|
|
|
|
|
|
|
Column({ space: 4 }) {
|
|
Column({ space: 4 }) {
|
|
|
Text(album.name ?? '未知专辑')
|
|
Text(album.name ?? '未知专辑')
|
|
@@ -842,7 +854,7 @@ export struct NavidromePage {
|
|
|
if (album.duration !== undefined) {
|
|
if (album.duration !== undefined) {
|
|
|
const duration = this.formatSongDuration(album.duration);
|
|
const duration = this.formatSongDuration(album.duration);
|
|
|
if (duration) {
|
|
if (duration) {
|
|
|
- parts.push(duration);
|
|
|
|
|
|
|
+ parts.push(' '+duration);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (album.minYear) {
|
|
if (album.minYear) {
|
|
@@ -993,7 +1005,7 @@ export struct NavidromePage {
|
|
|
.onClick(() => this.clearFilter())
|
|
.onClick(() => this.clearFilter())
|
|
|
}
|
|
}
|
|
|
.width('90%')
|
|
.width('90%')
|
|
|
- .padding({ left: 16, right: 16, top: 6, bottom: 2 })
|
|
|
|
|
|
|
+ .padding({ left: 16, right: 16, top: 12, bottom: 2 })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List({ space: 8 }) {
|
|
List({ space: 8 }) {
|
|
@@ -1019,7 +1031,8 @@ export struct NavidromePage {
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
- .padding({ top: 10, bottom: 10 })
|
|
|
|
|
|
|
+ .cachedCount(3)
|
|
|
|
|
+ .padding({ top: 5, bottom: 5 })
|
|
|
.listDirection(Axis.Vertical)
|
|
.listDirection(Axis.Vertical)
|
|
|
.scrollBar(BarState.Auto)
|
|
.scrollBar(BarState.Auto)
|
|
|
.edgeEffect(EdgeEffect.Spring)
|
|
.edgeEffect(EdgeEffect.Spring)
|
|
@@ -1052,7 +1065,11 @@ export struct NavidromePage {
|
|
|
build() {
|
|
build() {
|
|
|
|
|
|
|
|
Stack() {
|
|
Stack() {
|
|
|
- this.buildContentView();
|
|
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ this.buildContentView();
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding({top:this.topRectHeight+98})
|
|
|
|
|
+
|
|
|
Column() {
|
|
Column() {
|
|
|
this.topTitleBar()
|
|
this.topTitleBar()
|
|
|
}
|
|
}
|