From e1c182ebc5d8187198f1e3b7799c381bf5217d00 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 18 Aug 2024 23:35:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=94=81=E5=AF=B9=E6=89=8B=E5=8A=BF?= =?UTF-8?q?=E5=A4=B1=E6=95=88=EF=BC=9B=E9=94=81=E5=AE=9A=E5=90=8E=E9=80=80?= =?UTF-8?q?=E5=87=BA=E5=85=A8=E5=B1=8F=E6=97=A0=E6=B3=95=E8=A7=A3=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/view.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index df651f88..50aee28b 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -520,11 +520,12 @@ class _PLVideoPlayerState extends State Obx( () => InteractiveViewer( panEnabled: false, // 启用平移 //单指平移会与横竖手势冲突 - scaleEnabled: true, // 启用缩放 + scaleEnabled: !_.controlsLock.value, // 启用缩放 minScale: 1.0, maxScale: 2.0, panAxis: PanAxis.aligned, onInteractionStart: (ScaleStartDetails details) { + if (_.controlsLock.value) return; // 如果起点太靠上则屏蔽 if (details.localFocalPoint.dy < 40) return; if (details.pointerCount == 2) { @@ -1051,7 +1052,8 @@ class _PLVideoPlayerState extends State child: FractionalTranslation( translation: const Offset(1, -0.4), child: Visibility( - visible: _.showControls.value && _.isFullScreen.value, + visible: _.showControls.value && + (_.isFullScreen.value || _.controlsLock.value), child: ComBtn( tooltip: _.controlsLock.value ? '解锁' : '锁定', icon: Icon(