mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 播放器左右手势范围从1/3下调至1/4
This commit is contained in:
@@ -735,11 +735,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
_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<PLVideoPlayer>
|
||||
}
|
||||
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<PLVideoPlayer>
|
||||
_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; // 滑动阈值
|
||||
|
||||
Reference in New Issue
Block a user