From a9cb90b12397c95e191d6a820b4c8f21e1438e13 Mon Sep 17 00:00:00 2001 From: orz12 Date: Mon, 22 Apr 2024 20:18:46 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E6=92=AD=E6=94=BE=E5=99=A8=E5=B7=A6?= =?UTF-8?q?=E5=8F=B3=E6=89=8B=E5=8A=BF=E8=8C=83=E5=9B=B4=E4=BB=8E1/3?= =?UTF-8?q?=E4=B8=8B=E8=B0=83=E8=87=B31/4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/view.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 882efd619..6c0e854f5 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -735,11 +735,11 @@ class _PLVideoPlayerState extends State _playerKey.currentContext!.findRenderObject() as RenderBox; final double totalWidth = renderBox.size.width; final double tapPosition = details.localPosition.dx; - final double sectionWidth = totalWidth / 3; + final double sectionWidth = totalWidth / 4; String type = 'left'; if (tapPosition < sectionWidth) { type = 'left'; - } else if (tapPosition < sectionWidth * 2) { + } else if (tapPosition < sectionWidth * 3) { type = 'center'; } else { type = 'right'; @@ -793,7 +793,7 @@ class _PLVideoPlayerState extends State } final double totalWidth = renderBox.size.width; final double tapPosition = details.localPosition.dx; - final double sectionWidth = totalWidth / 3; + final double sectionWidth = totalWidth / 4; final double delta = details.delta.dy; if (lastFullScreenToggleTime != null && DateTime.now().difference(lastFullScreenToggleTime!) < @@ -807,7 +807,7 @@ class _PLVideoPlayerState extends State _brightnessValue.value - delta / level; final double result = brightness.clamp(0.0, 1.0); setBrightness(result); - } else if (tapPosition < sectionWidth * 2) { + } else if (tapPosition < sectionWidth * 3) { // 全屏 final double dy = details.delta.dy; const double threshold = 7.0; // 滑动阈值