|
|
@@ -3448,11 +3448,11 @@ export struct LocalMusic {
|
|
|
preview: MenuPreviewMode.IMAGE,
|
|
|
previewAnimationOptions: { scale: [0.8, 1.0] },
|
|
|
})
|
|
|
- .bindContextMenu(this.MenuBuilder(item, index, item.filePath), ResponseType.RightClick,
|
|
|
- {
|
|
|
- preview: MenuPreviewMode.IMAGE,
|
|
|
- previewAnimationOptions: { scale: [0.8, 1.0] },
|
|
|
- })
|
|
|
+ // .bindContextMenu(this.MenuBuilder(item, index, item.filePath), ResponseType.RightClick,
|
|
|
+ // {
|
|
|
+ // preview: MenuPreviewMode.IMAGE,
|
|
|
+ // previewAnimationOptions: { scale: [0.8, 1.0] },
|
|
|
+ // })
|
|
|
.transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 0.8, y: 0.8 }).animation({ duration: 500 }),
|
|
|
TransitionEffect.scale({ x: 0, y: 0 })))
|
|
|
.clickEffect({ level: ClickEffectLevel.LIGHT })
|
|
|
@@ -3460,70 +3460,7 @@ export struct LocalMusic {
|
|
|
.zIndex(this.dragItem === index ? 1 : 0)
|
|
|
.translate(this.dragItem === index ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 })
|
|
|
.hitTestBehavior(this.isDraggable(this.videoLocalList.indexOf(item)) ? HitTestMode.Default : HitTestMode.None)
|
|
|
- //长按拖动代码
|
|
|
- // .gesture(
|
|
|
- // GestureGroup(GestureMode.Sequence,
|
|
|
- // LongPressGesture({ repeat: true })
|
|
|
- // .onAction(() => {
|
|
|
- // this.getUIContext().animateTo({ curve: Curve.Friction, duration: 300 }, () => {
|
|
|
- // this.scaleItem = index;
|
|
|
- // })
|
|
|
- // })
|
|
|
- // .onActionEnd(() => {
|
|
|
- // this.getUIContext().animateTo({ curve: Curve.Friction, duration: 300 }, () => {
|
|
|
- // this.scaleItem = -1;
|
|
|
- // })
|
|
|
- // }),
|
|
|
- // PanGesture({ fingers: 1, direction: null, distance: 0 })
|
|
|
- // .onActionStart(() => {
|
|
|
- // this.dragItem = index;
|
|
|
- // this.dragRefOffSetX = 0;
|
|
|
- // this.dragRefOffSetY = 0;
|
|
|
- // })
|
|
|
- // .onActionUpdate((event: GestureEvent) => {
|
|
|
- // this.offsetX = event.offsetX - this.dragRefOffSetX;
|
|
|
- // this.offsetY = event.offsetY - this.dragRefOffSetY;
|
|
|
- // this.getUIContext().animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
|
|
|
- // let index = this.videoLocalList.indexOf(item);
|
|
|
- // if (this.offsetY >= this.FIX_VP_Y / 2 && (this.offsetX <= 44 && this.offsetX >= -44)) {
|
|
|
- // this.down(index);
|
|
|
- // } else if (this.offsetY <= -this.FIX_VP_Y / 2 && (this.offsetX <= 44 && this.offsetX >= -44)) {
|
|
|
- // this.up(index);
|
|
|
- // } else if (this.offsetX >= this.FIX_VP_X / 2 && (this.offsetY <= 50 && this.offsetY >= -50)) {
|
|
|
- // this.right(index);
|
|
|
- // } else if (this.offsetX <= -this.FIX_VP_Y / 2 && (this.offsetY <= 50 && this.offsetY >= -50)) {
|
|
|
- // this.left(index);
|
|
|
- // }
|
|
|
- // })
|
|
|
- //
|
|
|
- //
|
|
|
- // // if (this.offsetY > this.FIX_VP_Y * 0.7) {
|
|
|
- // // this.scroller.scrollToIndex(index + 10, true,ScrollAlign.CENTER);
|
|
|
- // // }
|
|
|
- //
|
|
|
- //
|
|
|
- // })
|
|
|
- // .onActionEnd(() => {
|
|
|
- // this.getUIContext().animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
|
|
|
- // this.dragItem = -1;
|
|
|
- // })
|
|
|
- // this.getUIContext().animateTo({ curve: curves.interpolatingSpring(14, 1, 170, 17), delay: 150 }, () => {
|
|
|
- // this.scaleItem = -1;
|
|
|
- // })
|
|
|
- // })
|
|
|
- // )
|
|
|
- // .onCancel(() => {
|
|
|
- // this.getUIContext().animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
|
|
|
- // this.dragItem = -1;
|
|
|
- // })
|
|
|
- // this.getUIContext().animateTo({ curve: curves.interpolatingSpring(14, 1, 170, 17), delay: 150 }, () => {
|
|
|
- // this.scaleItem = -1;
|
|
|
- // })
|
|
|
- // })
|
|
|
- // )
|
|
|
-
|
|
|
- // [End gesture_start]
|
|
|
- // [EndExclude GridItem_start]
|
|
|
+
|
|
|
|
|
|
}, (item: VideoItem) => item.filePath)
|
|
|
}
|
|
|
@@ -3761,42 +3698,6 @@ export struct LocalMusic {
|
|
|
|
|
|
}
|
|
|
|
|
|
- // .bindPopup(this.longItemFilePath === item.filePath, {
|
|
|
- // builder: this.MenuBuilder(item, index, item.filePath),
|
|
|
- // placement: Placement.Top,
|
|
|
- // // autoCancel: true,
|
|
|
- // mask: { color: '#33000000' },
|
|
|
- // // popupColor: Color.Yellow,
|
|
|
- // enableArrow: false, //是否显示箭头
|
|
|
- // showInSubWindow: false,
|
|
|
- // onStateChange: (e) => {
|
|
|
- // if (!e.isVisible) {
|
|
|
- // this.longItemFilePath = ''
|
|
|
- // this.tempLyricContent = ''
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
- //
|
|
|
- // .gesture(LongPressGesture()
|
|
|
- // .onAction(async () => {
|
|
|
- // //如果是专辑和艺术家的首页,不能长按
|
|
|
- // if ((this.modeType === 2 || this.modeType == 3) && !this.isCanBack) {
|
|
|
- // return
|
|
|
- // }
|
|
|
- // //如果是我的收藏 最近播放等也不能长按
|
|
|
- // if (item.name === LocalMusic.STR_LOCK_VIDEO || item.name === LocalMusic.STR_FAC_VIDEO ||
|
|
|
- // item.name === LocalMusic.STR_HISTORY_MUSIC
|
|
|
- // ) {
|
|
|
- // return
|
|
|
- // }
|
|
|
- // this.longItemFilePath = item.filePath
|
|
|
- // this.tempLyricContent = await this.getLyricContent(item)
|
|
|
- // LogUtil.info('长按this.tempLyricContent = ' + this.tempLyricContent)
|
|
|
- // })
|
|
|
- // .onActionEnd((event: GestureEvent) => {
|
|
|
- //
|
|
|
- // })
|
|
|
- // )
|
|
|
.height(this.twoFingerType == 3 ? 60 : this.twoFingerType == 2 ? 55 : 42)
|
|
|
.width(this.getGridWight())
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
@@ -6501,7 +6402,7 @@ export struct LocalMusic {
|
|
|
{ ratio: 1920 / 720, name: "1920x720" },
|
|
|
];
|
|
|
const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
- const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
+ const RATIO_TOLERANCE: number = 0.22; // 宽高比容差
|
|
|
LogUtil.info('twocold isHiCarKuanBianPing currentRatio = ' + currentRatio)
|
|
|
|
|
|
for (const hiCarRatio of hiCarAspectRatios) {
|
|
|
@@ -6528,9 +6429,10 @@ export struct LocalMusic {
|
|
|
const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
{ ratio: 800 / 480, name: "800x480" },
|
|
|
{ ratio: 1280 / 720, name: "1280x720" },
|
|
|
+ { ratio: 1920 / 1080, name: "1920x1080" },
|
|
|
];
|
|
|
const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
- const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
+ const RATIO_TOLERANCE: number = 0.22; // 宽高比容差
|
|
|
LogUtil.info('twocold isHiCarSmall currentRatio = ' + currentRatio)
|
|
|
|
|
|
for (const hiCarRatio of hiCarAspectRatios) {
|