opt viewpoint widget

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-18 13:19:45 +08:00
parent 1824c83cd0
commit 59bbe51702
2 changed files with 7 additions and 14 deletions

View File

@@ -26,7 +26,7 @@ class PlayerFocus extends StatelessWidget {
final CommonIntroController? introController; final CommonIntroController? introController;
final VoidCallback onSendDanmaku; final VoidCallback onSendDanmaku;
static bool _showHandled(KeyEvent event) { static bool _shouldHandled(KeyEvent event) {
return event.logicalKey == LogicalKeyboardKey.tab || return event.logicalKey == LogicalKeyboardKey.tab ||
event.logicalKey == LogicalKeyboardKey.arrowLeft || event.logicalKey == LogicalKeyboardKey.arrowLeft ||
event.logicalKey == LogicalKeyboardKey.arrowRight || event.logicalKey == LogicalKeyboardKey.arrowRight ||
@@ -40,7 +40,7 @@ class PlayerFocus extends StatelessWidget {
autofocus: true, autofocus: true,
onKeyEvent: (node, event) { onKeyEvent: (node, event) {
final handled = _handleKey(event); final handled = _handleKey(event);
if (handled || _showHandled(event)) { if (handled || _shouldHandled(event)) {
return KeyEventResult.handled; return KeyEventResult.handled;
} }
return KeyEventResult.ignored; return KeyEventResult.ignored;

View File

@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/widgets/progress_bar/segment_progress_bar.dart';
import 'package:PiliPlus/plugin/pl_player/controller.dart'; import 'package:PiliPlus/plugin/pl_player/controller.dart';
import 'package:PiliPlus/plugin/pl_player/view.dart'; import 'package:PiliPlus/plugin/pl_player/view.dart';
import 'package:PiliPlus/utils/feed_back.dart'; import 'package:PiliPlus/utils/feed_back.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -124,8 +125,7 @@ class BottomControl extends StatelessWidget {
), ),
), ),
if (controller.viewPointList.isNotEmpty && if (controller.viewPointList.isNotEmpty &&
controller.showVP.value) controller.showVP.value) ...[
// ...[
Positioned( Positioned(
left: 0, left: 0,
right: 0, right: 0,
@@ -142,16 +142,9 @@ class BottomControl extends StatelessWidget {
), ),
), ),
), ),
// buildViewPointWidget( if (!Utils.isMobile)
// controller, buildViewPointWidget(controller, 8.75, maxWidth - 40),
// 8.75, ],
// maxWidth -
// 40 -
// (isFullScreen
// ? MediaQuery.viewPaddingOf(context).horizontal
// : 0),
// ),
// ],
if (controller.dmTrend.isNotEmpty && if (controller.dmTrend.isNotEmpty &&
controller.showDmTreandChart.value) controller.showDmTreandChart.value)
buildDmChart(theme, controller, 4.5), buildDmChart(theme, controller, 4.5),