mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 03:56:45 +08:00
opt mouse control
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user