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;
|
_playerKey.currentContext!.findRenderObject() as RenderBox;
|
||||||
final double totalWidth = renderBox.size.width;
|
final double totalWidth = renderBox.size.width;
|
||||||
final double tapPosition = details.localPosition.dx;
|
final double tapPosition = details.localPosition.dx;
|
||||||
final double sectionWidth = totalWidth / 3;
|
final double sectionWidth = totalWidth / 4;
|
||||||
String type = 'left';
|
String type = 'left';
|
||||||
if (tapPosition < sectionWidth) {
|
if (tapPosition < sectionWidth) {
|
||||||
type = 'left';
|
type = 'left';
|
||||||
} else if (tapPosition < sectionWidth * 2) {
|
} else if (tapPosition < sectionWidth * 3) {
|
||||||
type = 'center';
|
type = 'center';
|
||||||
} else {
|
} else {
|
||||||
type = 'right';
|
type = 'right';
|
||||||
@@ -793,7 +793,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
}
|
}
|
||||||
final double totalWidth = renderBox.size.width;
|
final double totalWidth = renderBox.size.width;
|
||||||
final double tapPosition = details.localPosition.dx;
|
final double tapPosition = details.localPosition.dx;
|
||||||
final double sectionWidth = totalWidth / 3;
|
final double sectionWidth = totalWidth / 4;
|
||||||
final double delta = details.delta.dy;
|
final double delta = details.delta.dy;
|
||||||
if (lastFullScreenToggleTime != null &&
|
if (lastFullScreenToggleTime != null &&
|
||||||
DateTime.now().difference(lastFullScreenToggleTime!) <
|
DateTime.now().difference(lastFullScreenToggleTime!) <
|
||||||
@@ -807,7 +807,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
_brightnessValue.value - delta / level;
|
_brightnessValue.value - delta / level;
|
||||||
final double result = brightness.clamp(0.0, 1.0);
|
final double result = brightness.clamp(0.0, 1.0);
|
||||||
setBrightness(result);
|
setBrightness(result);
|
||||||
} else if (tapPosition < sectionWidth * 2) {
|
} else if (tapPosition < sectionWidth * 3) {
|
||||||
// 全屏
|
// 全屏
|
||||||
final double dy = details.delta.dy;
|
final double dy = details.delta.dy;
|
||||||
const double threshold = 7.0; // 滑动阈值
|
const double threshold = 7.0; // 滑动阈值
|
||||||
|
|||||||
Reference in New Issue
Block a user