|
|
@@ -6015,6 +6015,10 @@ export struct LocalMusic {
|
|
|
}
|
|
|
|
|
|
//是否是Pura X外屏,或者小屏幕,手机横屏
|
|
|
+ /**
|
|
|
+ * 是否是Pura X外屏,或者小屏幕,手机横屏
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
isCoverOpacity() {
|
|
|
if (this.isPuraWP()) {
|
|
|
return true
|
|
|
@@ -6042,6 +6046,9 @@ export struct LocalMusic {
|
|
|
LogUtil.info('hicar isPhoneLan height= ' + this.windowHeight);
|
|
|
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()}`);
|
|
|
+ if (this.isHiCarKuanBianPing()) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
if (this.isHiCar()) {
|
|
|
return false
|
|
|
}
|
|
|
@@ -6064,14 +6071,14 @@ export struct LocalMusic {
|
|
|
];
|
|
|
const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
- LogUtil.info('twocold currentRatio = ' + currentRatio)
|
|
|
+ LogUtil.info('twocold isHiCarKuanBianPing 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))
|
|
|
+ LogUtil.info('twocold isHiCarKuanBianPing hiCarRatio= ' + hiCarRatio.ratio)
|
|
|
+ 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}`);
|
|
|
- return true&&this.isHiCar();
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -6088,18 +6095,18 @@ export struct LocalMusic {
|
|
|
const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
{ ratio: 800 / 480, name: "800x480" },
|
|
|
{ ratio: 1280 / 720, name: "1280x720" },
|
|
|
- { ratio: 1920 / 720, name: "1920x720" },
|
|
|
];
|
|
|
const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
- LogUtil.info('twocold currentRatio = ' + currentRatio)
|
|
|
+ LogUtil.info('twocold isHiCarSmall 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))
|
|
|
+ LogUtil.info('twocold isHiCarSmall hiCarRatio= ' + hiCarRatio.ratio)
|
|
|
+ LogUtil.info('twocold isHiCarSmall Math.abs(currentRatio - hiCarRatio.ratio)= ' + Math.abs(currentRatio - hiCarRatio.ratio))
|
|
|
+ LogUtil.info('twocold isHiCarSmall isHiCarStatus= ' + this.isHiCarStatus);
|
|
|
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 this.isHiCarStatus;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -7237,7 +7244,7 @@ export struct LocalMusic {
|
|
|
})
|
|
|
|
|
|
}
|
|
|
- .padding({ right: 7,left:28 })
|
|
|
+ .padding({ right: 7,left:14 })
|
|
|
Row(){
|
|
|
Text(this.currentTime)
|
|
|
.fontSize(10)
|
|
|
@@ -7249,7 +7256,7 @@ export struct LocalMusic {
|
|
|
.fontColor(Color.White)
|
|
|
}
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
- .padding({ right: 18,left:35 })
|
|
|
+ .padding({ right: 18,left:36 })
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -7603,7 +7610,7 @@ export struct LocalMusic {
|
|
|
this.musicNameInfo(false)
|
|
|
} else {
|
|
|
Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
- .height(this.isHiCarSmall()?(this.isHiCarKuanBianPing()?140:220):(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162))
|
|
|
+ .height(this.isHiCarSmall()?(this.isHiCarKuanBianPing()?140:px2vp(this.windowHeight)*0.38):(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162))
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
.alt(this.imageLabel)
|
|
|
.margin({ right: 20, left: 20 })
|