|
@@ -1206,6 +1206,7 @@ export struct LocalMusic {
|
|
|
transition: AnimationHelper.transitionInDown(555),
|
|
transition: AnimationHelper.transitionInDown(555),
|
|
|
onAction: (index) => {
|
|
onAction: (index) => {
|
|
|
this.doSortType(index)
|
|
this.doSortType(index)
|
|
|
|
|
+ PreferencesUtil.put(SettingPage.SORT_TYPE, index)
|
|
|
this.updateListData(this.videoLocalList, true)
|
|
this.updateListData(this.videoLocalList, true)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -3553,7 +3554,7 @@ export struct LocalMusic {
|
|
|
this.isGridMusic = false
|
|
this.isGridMusic = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE, this.twoFingerType)
|
|
|
this.pinchValue = 1;
|
|
this.pinchValue = 1;
|
|
|
this.scaleValue = 1;
|
|
this.scaleValue = 1;
|
|
|
}
|
|
}
|
|
@@ -3906,6 +3907,7 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE, this.twoFingerType)
|
|
|
this.pinchValue = 1;
|
|
this.pinchValue = 1;
|
|
|
this.scaleValue = 1;
|
|
this.scaleValue = 1;
|
|
|
}
|
|
}
|
|
@@ -4364,6 +4366,11 @@ export struct LocalMusic {
|
|
|
this.titleBarModel.setLeftIconMain($r('app.media.left_back_white'))
|
|
this.titleBarModel.setLeftIconMain($r('app.media.left_back_white'))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //进入歌单的时候的滚动位置在顶部
|
|
|
|
|
+ if (this.isGridMusic) {
|
|
|
|
|
+ this.scroller.scrollToIndex(0)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
break;
|
|
break;
|
|
|
case CommonConstants.TYPE_IS_ALBUM:
|
|
case CommonConstants.TYPE_IS_ALBUM:
|
|
|
// 进入专辑前安全保存当前滚动偏移量,支持列表和网格
|
|
// 进入专辑前安全保存当前滚动偏移量,支持列表和网格
|
|
@@ -5134,20 +5141,6 @@ export struct LocalMusic {
|
|
|
.margin({ top: 10, bottom: 10 })
|
|
.margin({ top: 10, bottom: 10 })
|
|
|
.justifyContent(FlexAlign.Start)
|
|
.justifyContent(FlexAlign.Start)
|
|
|
|
|
|
|
|
- Row() {
|
|
|
|
|
- Text('音轨数:')
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .margin({ left: 22 })
|
|
|
|
|
- Text(StrUtil.isEmpty(currentItem.trackCount)?'1':currentItem.trackCount)
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .margin({ left: 10 })
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .margin({ top: 10, bottom: 10 })
|
|
|
|
|
- .justifyContent(FlexAlign.Start)
|
|
|
|
|
|
|
|
|
|
Row() {
|
|
Row() {
|
|
|
Text('格式:')
|
|
Text('格式:')
|
|
@@ -5887,9 +5880,9 @@ export struct LocalMusic {
|
|
|
// LogUtil.info('twocold this.currentWidthBreakpoint = '+this.currentWidthBreakpoint)
|
|
// LogUtil.info('twocold this.currentWidthBreakpoint = '+this.currentWidthBreakpoint)
|
|
|
LogUtil.info('hicar isPhoneLan width= ' + this.windowWidth);
|
|
LogUtil.info('hicar isPhoneLan width= ' + this.windowWidth);
|
|
|
LogUtil.info('hicar isPhoneLan height= ' + this.windowHeight);
|
|
LogUtil.info('hicar isPhoneLan height= ' + this.windowHeight);
|
|
|
- LogUtil.info(`twocold hicarWindow size: ${this.windowWidth}x${this.windowHeight}, isHiCar: ${this.isHiCar()}`);
|
|
|
|
|
|
|
+ LogUtil.info(`twocold hicarWindow size: ${this.windowWidth}x${this.windowHeight}, this.isHiCarStatus: ${this.isHiCarStatus}`);
|
|
|
LogUtil.info(`twocold hicar Window size: ${this.windowWidth}x${this.windowHeight}, isHiCarSmall: ${this.isHiCarSmall()}`);
|
|
LogUtil.info(`twocold hicar Window size: ${this.windowWidth}x${this.windowHeight}, isHiCarSmall: ${this.isHiCarSmall()}`);
|
|
|
- if (this.isHiCar()) {
|
|
|
|
|
|
|
+ if (this.isHiCarStatus) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -5962,29 +5955,31 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
isHiCar() {
|
|
isHiCar() {
|
|
|
|
|
|
|
|
- const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
|
|
- { ratio: 800 / 480, name: "800x480" },
|
|
|
|
|
- { ratio: 762 / 752, name: "762x752" },
|
|
|
|
|
- { ratio: 968 / 1280, name: "968x1280" },
|
|
|
|
|
- { ratio: 1200 / 1200, name: "1200x1200" },
|
|
|
|
|
- { ratio: 1280 / 720, name: "1280x720" },
|
|
|
|
|
- { ratio: 1920 / 720, name: "1920x720" },
|
|
|
|
|
- { ratio: 1920 / 1080, name: "1920x1080" }
|
|
|
|
|
- ];
|
|
|
|
|
- const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
|
|
- const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
|
|
- LogUtil.info('twocold currentRatio = ' + currentRatio)
|
|
|
|
|
-
|
|
|
|
|
- for (const hiCarRatio of hiCarAspectRatios) {
|
|
|
|
|
- LogUtil.info('twocold hiCarRatio= ' + hiCarRatio.ratio)
|
|
|
|
|
- LogUtil.info('twocold 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}`);
|
|
|
|
|
- return true&&this.isHiCarStatus;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ return this.isHiCarStatus;
|
|
|
|
|
+
|
|
|
|
|
+ // const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
|
|
+ // { ratio: 800 / 480, name: "800x480" },
|
|
|
|
|
+ // { ratio: 762 / 752, name: "762x752" },
|
|
|
|
|
+ // { ratio: 968 / 1280, name: "968x1280" },
|
|
|
|
|
+ // { ratio: 1200 / 1200, name: "1200x1200" },
|
|
|
|
|
+ // { ratio: 1280 / 720, name: "1280x720" },
|
|
|
|
|
+ // { ratio: 1920 / 720, name: "1920x720" },
|
|
|
|
|
+ // { ratio: 1920 / 1080, name: "1920x1080" }
|
|
|
|
|
+ // ];
|
|
|
|
|
+ // const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
|
|
+ // const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
|
|
+ // LogUtil.info('twocold currentRatio = ' + currentRatio)
|
|
|
|
|
+ //
|
|
|
|
|
+ // for (const hiCarRatio of hiCarAspectRatios) {
|
|
|
|
|
+ // LogUtil.info('twocold hiCarRatio= ' + hiCarRatio.ratio)
|
|
|
|
|
+ // LogUtil.info('twocold 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}`);
|
|
|
|
|
+ // return true&&this.isHiCarStatus;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ //
|
|
|
|
|
+ // return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -7981,8 +7976,8 @@ export struct LocalMusic {
|
|
|
.fontColor(Color.White)
|
|
.fontColor(Color.White)
|
|
|
Slider({
|
|
Slider({
|
|
|
value: isPip ? this.currentLyricLineSpacePip : this.currentLyricLineSpace,
|
|
value: isPip ? this.currentLyricLineSpacePip : this.currentLyricLineSpace,
|
|
|
- min: 2,
|
|
|
|
|
- max: 120,
|
|
|
|
|
|
|
+ min: 0,
|
|
|
|
|
+ max: 100,
|
|
|
step: 1,
|
|
step: 1,
|
|
|
style: SliderStyle.OutSet
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
})
|
|
@@ -8051,7 +8046,7 @@ export struct LocalMusic {
|
|
|
Slider({
|
|
Slider({
|
|
|
value: isPip ? this.blurDegreePip : this.blurDegree,
|
|
value: isPip ? this.blurDegreePip : this.blurDegree,
|
|
|
min: 0,
|
|
min: 0,
|
|
|
- max: 10,
|
|
|
|
|
|
|
+ max: 5,
|
|
|
step: 0.1,
|
|
step: 0.1,
|
|
|
style: SliderStyle.OutSet
|
|
style: SliderStyle.OutSet
|
|
|
})
|
|
})
|