|
|
@@ -4052,7 +4052,7 @@ export struct LocalMusic {
|
|
|
// .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
|
.margin({
|
|
|
bottom: this.isCoverOpacity() ? (this.isShowCoverHeader() ? 25 : 80)
|
|
|
- : (this.isShowCoverHeader() ? 85 : 175)
|
|
|
+ : (this.isShowCoverHeader() ? 85 : this.isHiCarSmall()?140:175)
|
|
|
})
|
|
|
.cachedCount(6)
|
|
|
.borderRadius(20)
|
|
|
@@ -5751,16 +5751,38 @@ export struct LocalMusic {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+ //是不是1920x720的hicar的屏幕分辨率
|
|
|
+ isHiCarKuanBianPing(){
|
|
|
+ const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
+ { ratio: 1920 / 720, name: "1920x720" },
|
|
|
+ ];
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//是不是hicar的屏幕分辨率
|
|
|
isHiCarSmall() {
|
|
|
|
|
|
if(this.windowWidth>1800&&this.windowHeight>=1200)//大屏幕可以Grid
|
|
|
return false
|
|
|
|
|
|
-
|
|
|
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; // 宽高比容差
|
|
|
@@ -5787,6 +5809,7 @@ export struct LocalMusic {
|
|
|
{ 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;
|
|
|
@@ -6699,7 +6722,7 @@ export struct LocalMusic {
|
|
|
})
|
|
|
.width("100%")
|
|
|
.layoutWeight(1)
|
|
|
- .margin({ left: this.currentLyricAlignMode === 0 ? 0 : 50, top: 2, bottom: this.isPhoneLan() ? 40 : 10 })
|
|
|
+ .margin({ left: this.currentLyricAlignMode === 0 ? 0 : 50, top: 2, bottom: this.isPhoneLan()||this.isHiCarKuanBianPing() ? 40 : 10 })
|
|
|
|
|
|
|
|
|
if (this.isPhoneLan()) {
|
|
|
@@ -6894,7 +6917,7 @@ export struct LocalMusic {
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
- .margin({ left: 10, right: 10 })
|
|
|
+ .margin({ left: 20, right: 10 })
|
|
|
.clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
|
|
|
.onClick(async () => {
|
|
|
this.setLoopMode()
|
|
|
@@ -6969,7 +6992,7 @@ export struct LocalMusic {
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
- .margin({ right: 10, left: 20 })
|
|
|
+ .margin({ right: 20, left: 10 })
|
|
|
.clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
|
|
|
.onClick(() => {
|
|
|
this.isShowSheetView = !this.isShowSheetView;
|
|
|
@@ -6986,7 +7009,7 @@ export struct LocalMusic {
|
|
|
}
|
|
|
//x5的竖屏模式需要99%
|
|
|
.width(this.isPhonePortrait() ? '93.4%'
|
|
|
- : this.currentHeightBreakpoint == 1 && this.currentWidthBreakpoint == 2 ? '99%' : '85%')
|
|
|
+ : this.currentHeightBreakpoint == 1 && this.currentWidthBreakpoint == 2 ? '99%' : '82%')
|
|
|
.height(this.isPhoneLan() ? 25 : 33)
|
|
|
// .visibility(this.isPhoneLan()&&this.isAutoHide?Visibility.None:Visibility.Visible)
|
|
|
.animation({
|
|
|
@@ -7083,7 +7106,7 @@ export struct LocalMusic {
|
|
|
this.musicNameInfo(false)
|
|
|
} else {
|
|
|
Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
- .height(this.isHiCarSmall()?220:(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162))
|
|
|
+ .height(this.isHiCarSmall()?(this.isHiCarKuanBianPing()?140:220):(this.isCoverOpacity() ? 250 : this.isCoverRectangle ? 320 : 162))
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
.alt(this.imageLabel)
|
|
|
.margin({ right: 20, left: 20 })
|