|
|
@@ -2566,7 +2566,7 @@ export struct LocalMusic {
|
|
|
.borderRadius('100%')
|
|
|
.clip(true)
|
|
|
.draggable(false)
|
|
|
- .interpolation(ImageInterpolation.Medium)// 用于重采样后的抗锯齿
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
.autoResize(true) // 重采样,可减少内存占用
|
|
|
.opacity(this.opacityItem)// 绑定透明度
|
|
|
.margin({ left: 20 })
|
|
|
@@ -3283,7 +3283,13 @@ export struct LocalMusic {
|
|
|
}
|
|
|
})
|
|
|
.onClick(() => {
|
|
|
- this.isGridMusic = !this.isGridMusic
|
|
|
+ if(this.twoFingerType==4){
|
|
|
+ this.isGridMusic = false
|
|
|
+ }else{
|
|
|
+ this.isGridMusic = !this.isGridMusic
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
PreferencesUtil.put(SettingPage.IS_GRID_MUSIC, this.isGridMusic)
|
|
|
})
|
|
|
}
|
|
|
@@ -3457,7 +3463,9 @@ export struct LocalMusic {
|
|
|
.columnsGap(12) // 列间距
|
|
|
.rowsGap(16) // 行间距
|
|
|
.cachedCount(6)
|
|
|
- .margin({bottom:this.isShowCoverHeader()? 25:
|
|
|
+ .margin(
|
|
|
+ this.isHiCar()&&(this.windowWidth>1800&&this.windowHeight>=1200)?{bottom:this.bottomBarHeight+98}:
|
|
|
+ {bottom:this.isShowCoverHeader()? 25:
|
|
|
this.isCoverOpacity()?this.topBarHeight+this.bottomBarHeight+78
|
|
|
:this.topBarHeight+this.bottomBarHeight+108})
|
|
|
.transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
@@ -3619,7 +3627,7 @@ export struct LocalMusic {
|
|
|
bottomLeft: 0,
|
|
|
bottomRight: 0
|
|
|
})
|
|
|
- .interpolation(ImageInterpolation.Medium)// 用于重采样后的抗锯齿
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
.draggable(false)// 禁止长按手势拖动
|
|
|
.autoResize(true) // 重采样,可减少内存占用
|
|
|
.width('100%')
|
|
|
@@ -3908,7 +3916,10 @@ export struct LocalMusic {
|
|
|
.transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
.animation({ duration: 500, curve: Curve.Ease }))
|
|
|
// .margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
|
|
|
- .margin({
|
|
|
+ .margin(
|
|
|
+ this.isHiCar()&&(this.windowWidth>1800&&this.windowHeight>=1200)?{bottom:this.bottomBarHeight+98}:
|
|
|
+
|
|
|
+ {
|
|
|
bottom: this.isCoverOpacity() ? (this.isShowCoverHeader() ? this.topBarHeight+30 : this.topBarHeight+90)
|
|
|
: (this.isShowCoverHeader() ? this.topBarHeight+45 : this.topBarHeight+128)
|
|
|
})
|
|
|
@@ -4035,7 +4046,7 @@ export struct LocalMusic {
|
|
|
.height(this.getGridHeight())
|
|
|
.width(this.getGridWight())
|
|
|
.draggable(false)
|
|
|
- .interpolation(ImageInterpolation.Medium)// 用于重采样后的抗锯齿
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
.autoResize(true) // 重采样,可减少内存占用
|
|
|
.alt($r('app.media.ic_avatar2'))
|
|
|
.clip(true)
|
|
|
@@ -4579,7 +4590,9 @@ export struct LocalMusic {
|
|
|
|
|
|
}))
|
|
|
// .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
|
- .margin({
|
|
|
+ .margin(
|
|
|
+ this.isHiCar()&&(this.windowWidth>1800&&this.windowHeight>=1200)?{bottom:this.bottomBarHeight+98}:
|
|
|
+ {
|
|
|
bottom: this.isCoverOpacity() ? (this.isShowCoverHeader() ? this.topBarHeight+25 : this.topBarHeight+80)
|
|
|
: (this.isShowCoverHeader() ? this.topBarHeight+35 : this.isHiCarSmall()?this.topBarHeight+90:this.topBarHeight+125)
|
|
|
})
|
|
|
@@ -5001,6 +5014,9 @@ export struct LocalMusic {
|
|
|
Column(){
|
|
|
this.centerName()
|
|
|
}.layoutWeight(1)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.showPlayerView()
|
|
|
+ })
|
|
|
this.playConLeft(false)
|
|
|
|
|
|
}else{
|
|
|
@@ -5089,20 +5105,26 @@ export struct LocalMusic {
|
|
|
.layoutWeight(isLeft?1:0)
|
|
|
.clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
|
|
|
.onClick(() => {
|
|
|
+ this.showPlayerView()
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- if (ArrayUtil.isNotEmpty(this.songList)) {
|
|
|
- this.isShowPlay = true;
|
|
|
- let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc';
|
|
|
- this.initLyric(lyricPath);
|
|
|
- this.startAutoHide();
|
|
|
+ //打开播放页
|
|
|
+ showPlayerView() {
|
|
|
+
|
|
|
+ if (ArrayUtil.isNotEmpty(this.songList)) {
|
|
|
+ this.isShowPlay = true;
|
|
|
+ let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc';
|
|
|
+ this.initLyric(lyricPath);
|
|
|
+ this.startAutoHide();
|
|
|
|
|
|
|
|
|
- } else {
|
|
|
- ToastUtil.showToast('当前播放列表为空,请先导入音乐。');
|
|
|
- }
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast('当前播放列表为空,请先导入音乐。');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Builder
|
|
|
playConRigth() {
|
|
|
Row() {
|
|
|
@@ -6821,6 +6843,9 @@ export struct LocalMusic {
|
|
|
.fillColor(this.themeColor)
|
|
|
.borderRadius('100%')
|
|
|
.clip(true)
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
+ .draggable(false)// 禁止长按手势拖动
|
|
|
+ .autoResize(true) // 重采样,可减少内存占用
|
|
|
.margin({ left: 20 })
|
|
|
}
|
|
|
.width('15%')
|
|
|
@@ -7048,6 +7073,9 @@ export struct LocalMusic {
|
|
|
LogUtil.info('twocold isHiCarKuanBianPing Math.abs(currentRatio - hiCarRatio.ratio)= ' + Math.abs(currentRatio - hiCarRatio.ratio))
|
|
|
if (Math.abs(currentRatio - hiCarRatio.ratio) <= RATIO_TOLERANCE) {
|
|
|
// LogUtil.info(`HiCar detected: ${hiCarRatio.name}, actual: ${this.windowWidth}x${this.windowHeight}`);
|
|
|
+ //宽扁平的尺寸设置列表展示
|
|
|
+ this.twoFingerType ==3
|
|
|
+ this.isGridMusic = false
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -7062,7 +7090,11 @@ export struct LocalMusic {
|
|
|
return false
|
|
|
}
|
|
|
if(this.windowWidth>1800&&this.windowHeight>=1200)//大屏幕可以Grid
|
|
|
+ {
|
|
|
+ this.columns = 6
|
|
|
return false
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
{ ratio: 800 / 480, name: "800x480" },
|
|
|
@@ -8589,8 +8621,9 @@ export struct LocalMusic {
|
|
|
|
|
|
Column() {
|
|
|
if (this.isCoverTop && !this.isCoverOpacity() && this.isCoverRectangle) {
|
|
|
- Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)// .height(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162)
|
|
|
- .width(this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '86%')
|
|
|
+ Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
+ .height(this.isHiCar()?(px2vp(this.windowHeight)*0.46):'auto')
|
|
|
+ .width(this.isHiCar()?'auto':this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '88%')
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
.alt(this.imageLabel)
|
|
|
.margin({ right: 8, left: 8, top: 8 })
|
|
|
@@ -11727,13 +11760,13 @@ export struct LocalMusic {
|
|
|
ToastUtil.showToast('wma格式不支持拖动快进。')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ this.isSeekTo = true
|
|
|
this.mIjkMediaPlayer.seekTo(value);
|
|
|
console.info('onecold startPlayOrResumePlay 11227')
|
|
|
// this.startPlayOrResumePlay()
|
|
|
// 在这里恢复计时器状态
|
|
|
this.setProgress()
|
|
|
- // this.startProgressTask();
|
|
|
+ this.isSeekTo = false
|
|
|
}
|
|
|
|
|
|
// 添加到下一首播放
|