From 1816eaf7b5e2c53e3933e53c6ddf3787cd98b8c6 Mon Sep 17 00:00:00 2001 From: Elaina Date: Fri, 31 May 2024 14:37:43 +0800 Subject: [PATCH] feat: move overscan btn to header control --- .../video/detail/widgets/header_control.dart | 7 +++++ lib/plugin/pl_player/view.dart | 28 +++++++------------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/pages/video/detail/widgets/header_control.dart b/lib/pages/video/detail/widgets/header_control.dart index 1ee65d833..c733d75fb 100644 --- a/lib/pages/video/detail/widgets/header_control.dart +++ b/lib/pages/video/detail/widgets/header_control.dart @@ -1295,6 +1295,13 @@ class _HeaderControlState extends State { // ), // ), // ), + + ComBtn( + icon: const Icon(Icons.settings_overscan, + size: 20, color: Colors.white), + fuc: () => _.toggleVideoFit(), + ), + SizedBox(width: buttonSpace), ComBtn( icon: const Icon( Icons.closed_caption_off, diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index be24b1050..2a05a2cc5 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -267,29 +267,21 @@ class _PLVideoPlayerState extends State BottomControlType.space: const Spacer(), /// 画面比例 - BottomControlType.fit: SizedBox( - height: 30, - child: TextButton( - onPressed: () => _.toggleVideoFit(), - style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.zero), - ), - child: Obx( - () => Text( - _.videoFitDEsc.value, - style: const TextStyle(color: Colors.white, fontSize: 13), - ), - ), - ), - ), - + // BottomControlType.fit: ComBtn( + // fuc: () => _.toggleVideoFit(), + // icon: const Icon( + // Icons.fit_screen_outlined, + // size: 20, + // color: Colors.white, + // )), +// /// 播放速度 BottomControlType.speed: SizedBox( width: 45, height: 34, child: TextButton( style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.zero), + padding: WidgetStateProperty.all(EdgeInsets.zero), ), onPressed: () {}, child: Obx( @@ -322,7 +314,7 @@ class _PLVideoPlayerState extends State BottomControlType.playOrPause, BottomControlType.time, BottomControlType.space, - BottomControlType.fit, + // BottomControlType.fit, BottomControlType.fullscreen, ]; for (var i = 0; i < userSpecifyItem.length; i++) {