opt mouse control

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-28 15:33:09 +08:00
parent 2031604ea2
commit 5f8dc76891
19 changed files with 268 additions and 191 deletions

View File

@@ -411,11 +411,17 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
),
onTap: widget.showViewPoints,
onLongPress: () {
Feedback.forLongPress(context);
videoDetailController.showVP.value =
!videoDetailController.showVP.value;
},
onLongPress: Utils.isMobile
? () {
Feedback.forLongPress(context);
videoDetailController.showVP.value =
!videoDetailController.showVP.value;
}
: null,
onSecondaryTap: Utils.isMobile
? null
: () => videoDetailController.showVP.value =
!videoDetailController.showVP.value,
),
),

View File

@@ -4,6 +4,7 @@ class ComBtn extends StatelessWidget {
final Widget icon;
final VoidCallback? onTap;
final VoidCallback? onLongPress;
final VoidCallback? onSecondaryTap;
final double width;
final double height;
final String? tooltip;
@@ -13,6 +14,7 @@ class ComBtn extends StatelessWidget {
required this.icon,
this.onTap,
this.onLongPress,
this.onSecondaryTap,
this.width = 34,
this.height = 34,
this.tooltip,
@@ -26,6 +28,7 @@ class ComBtn extends StatelessWidget {
child: GestureDetector(
onTap: onTap,
onLongPress: onLongPress,
onSecondaryTap: onSecondaryTap,
behavior: HitTestBehavior.opaque,
child: icon,
),