diff --git a/lib/pages/setting/style_setting.dart b/lib/pages/setting/style_setting.dart index 5c5fc4aa..025a6116 100644 --- a/lib/pages/setting/style_setting.dart +++ b/lib/pages/setting/style_setting.dart @@ -126,14 +126,14 @@ class _StyleSettingState extends State { style: subTitleStyle, ), ), - const SetSwitchItem( - title: '播放页状态栏显示为背景色', - subTitle: '关闭则显示为黑色', - leading: Icon(Icons.border_outer_outlined), - setKey: SettingBoxKey.videoPlayerShowStatusBarBackgroundColor, - defaultVal: false, - needReboot: true, - ), + // const SetSwitchItem( + // title: '播放页状态栏显示为背景色', + // subTitle: '关闭则显示为黑色', + // leading: Icon(Icons.border_outer_outlined), + // setKey: SettingBoxKey.videoPlayerShowStatusBarBackgroundColor, + // defaultVal: false, + // needReboot: true, + // ), const SetSwitchItem( title: '播放页移除安全边距', subTitle: '隐藏状态栏、撑满屏幕,但播放控件仍处于安全域内', diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 05ff71a2..03efd501 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -81,7 +81,7 @@ class _VideoDetailPageState extends State late bool autoPiP; late bool pipNoDanmaku; late bool removeSafeArea; - late bool showStatusBarBackgroundColor; + // late bool showStatusBarBackgroundColor; final Floating floating = Floating(); // 生命周期监听 // late final AppLifecycleListener _lifecycleListener; @@ -142,9 +142,9 @@ class _VideoDetailPageState extends State setting.get(SettingBoxKey.enableVerticalExpand, defaultValue: false); removeSafeArea = setting.get(SettingBoxKey.videoPlayerRemoveSafeArea, defaultValue: false); - showStatusBarBackgroundColor = setting.get( - SettingBoxKey.videoPlayerShowStatusBarBackgroundColor, - defaultValue: false); + // showStatusBarBackgroundColor = setting.get( + // SettingBoxKey.videoPlayerShowStatusBarBackgroundColor, + // defaultValue: false); if (removeSafeArea) hideStatusBar(); videoSourceInit(); appbarStreamListen(); @@ -485,16 +485,17 @@ class _VideoDetailPageState extends State appBar: removeSafeArea ? null : AppBar( - backgroundColor: - showStatusBarBackgroundColor ? null : Colors.black, + backgroundColor: Colors.black, + // showStatusBarBackgroundColor ? null : Colors.black, toolbarHeight: 0, - systemOverlayStyle: SystemUiOverlayStyle( - statusBarIconBrightness: - Theme.of(context).brightness == Brightness.dark || - !showStatusBarBackgroundColor - ? Brightness.light - : Brightness.dark, - systemNavigationBarColor: Colors.transparent), + // systemOverlayStyle: SystemUiOverlayStyle( + // statusBarIconBrightness: + // Theme.of(context).brightness == Brightness.dark || + // !showStatusBarBackgroundColor + // ? Brightness.light + // : Brightness.dark, + // systemNavigationBarColor: Colors.transparent, + // ), ), body: Column( children: [ @@ -523,8 +524,8 @@ class _VideoDetailPageState extends State if (!removeSafeArea) showStatusBar(); } return Container( - color: - showStatusBarBackgroundColor ? null : Colors.black, + color: Colors.black, + // showStatusBarBackgroundColor ? null : Colors.black, height: MediaQuery.of(context).orientation == Orientation.landscape || isFullScreen @@ -825,16 +826,17 @@ class _VideoDetailPageState extends State appBar: removeSafeArea ? null : AppBar( - backgroundColor: - showStatusBarBackgroundColor ? null : Colors.black, + backgroundColor: Colors.black, + // showStatusBarBackgroundColor ? null : Colors.black, toolbarHeight: 0, - systemOverlayStyle: SystemUiOverlayStyle( - statusBarIconBrightness: - Theme.of(context).brightness == Brightness.dark || - !showStatusBarBackgroundColor - ? Brightness.light - : Brightness.dark, - systemNavigationBarColor: Colors.transparent), + // systemOverlayStyle: SystemUiOverlayStyle( + // statusBarIconBrightness: + // Theme.of(context).brightness == Brightness.dark || + // !showStatusBarBackgroundColor + // ? Brightness.light + // : Brightness.dark, + // systemNavigationBarColor: Colors.transparent, + // ), ), body: Container( color: Theme.of(context).colorScheme.surface, @@ -857,16 +859,17 @@ class _VideoDetailPageState extends State appBar: removeSafeArea ? null : AppBar( - backgroundColor: - showStatusBarBackgroundColor ? null : Colors.black, + backgroundColor: Colors.black, + // showStatusBarBackgroundColor ? null : Colors.black, toolbarHeight: 0, - systemOverlayStyle: SystemUiOverlayStyle( - statusBarIconBrightness: - Theme.of(context).brightness == Brightness.dark || - !showStatusBarBackgroundColor - ? Brightness.light - : Brightness.dark, - systemNavigationBarColor: Colors.transparent), + // systemOverlayStyle: SystemUiOverlayStyle( + // statusBarIconBrightness: + // Theme.of(context).brightness == Brightness.dark || + // !showStatusBarBackgroundColor + // ? Brightness.light + // : Brightness.dark, + // systemNavigationBarColor: Colors.transparent, + // ), ), body: Container( color: Theme.of(context).colorScheme.surface, diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index f9b20054..5f6e07d1 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -842,48 +842,40 @@ class _PLVideoPlayerState extends State IgnorePointer( ignoring: true, child: Align( + alignment: Alignment.center, child: Obx( () => AnimatedOpacity( curve: Curves.easeInOut, opacity: _volumeIndicator.value ? 1.0 : 0.0, duration: const Duration(milliseconds: 150), child: Container( - alignment: Alignment.center, + padding: + const EdgeInsets.symmetric(horizontal: 8, vertical: 5), decoration: BoxDecoration( color: const Color(0x88000000), borderRadius: BorderRadius.circular(64.0), ), - height: 34.0, - width: 70.0, child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - height: 34.0, - width: 28.0, - alignment: Alignment.centerRight, - child: Icon( - _volumeValue.value == 0.0 - ? Icons.volume_off - : _volumeValue.value < 0.5 - ? Icons.volume_down - : Icons.volume_up, - color: const Color(0xFFFFFFFF), - size: 20.0, + Icon( + _volumeValue.value == 0.0 + ? Icons.volume_off + : _volumeValue.value < 0.5 + ? Icons.volume_down + : Icons.volume_up, + color: const Color(0xFFFFFFFF), + size: 20.0, + ), + const SizedBox(width: 2.0), + Text( + '${(_volumeValue.value * 100.0).round()}%', + style: const TextStyle( + fontSize: 13.0, + color: Color(0xFFFFFFFF), ), ), - Expanded( - child: Text( - '${(_volumeValue.value * 100.0).round()}%', - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 13.0, - color: Color(0xFFFFFFFF), - ), - ), - ), - const SizedBox(width: 6.0), ], ), ), @@ -896,49 +888,40 @@ class _PLVideoPlayerState extends State IgnorePointer( ignoring: true, child: Align( + alignment: Alignment.center, child: Obx( () => AnimatedOpacity( curve: Curves.easeInOut, opacity: _brightnessIndicator.value ? 1.0 : 0.0, duration: const Duration(milliseconds: 150), child: Container( - alignment: Alignment.center, + padding: + const EdgeInsets.symmetric(horizontal: 8, vertical: 5), decoration: BoxDecoration( color: const Color(0x88000000), borderRadius: BorderRadius.circular(64.0), ), - height: 34.0, - width: 70.0, child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - height: 30.0, - width: 28.0, - alignment: Alignment.centerRight, - child: Icon( - _brightnessValue.value < 1.0 / 3.0 - ? Icons.brightness_low - : _brightnessValue.value < 2.0 / 3.0 - ? Icons.brightness_medium - : Icons.brightness_high, - color: const Color(0xFFFFFFFF), - size: 18.0, - ), + Icon( + _brightnessValue.value < 1.0 / 3.0 + ? Icons.brightness_low + : _brightnessValue.value < 2.0 / 3.0 + ? Icons.brightness_medium + : Icons.brightness_high, + color: const Color(0xFFFFFFFF), + size: 18.0, ), const SizedBox(width: 2.0), - Expanded( - child: Text( - '${(_brightnessValue.value * 100.0).round()}%', - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 13.0, - color: Color(0xFFFFFFFF), - ), + Text( + '${(_brightnessValue.value * 100.0).round()}%', + style: const TextStyle( + fontSize: 13.0, + color: Color(0xFFFFFFFF), ), ), - const SizedBox(width: 6.0), ], ), ), diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index d7ccf28c..224c7c28 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -340,8 +340,8 @@ class SettingBoxKey { displayMode = 'displayMode', maxRowWidth = 'maxRowWidth', // 首页列最大宽度(dp) videoPlayerRemoveSafeArea = 'videoPlayerRemoveSafeArea', // 视频播放器移除安全边距 - videoPlayerShowStatusBarBackgroundColor = - 'videoPlayerShowStatusBarBackgroundColor', // 播放页状态栏显示为背景色 + // videoPlayerShowStatusBarBackgroundColor = + // 'videoPlayerShowStatusBarBackgroundColor', // 播放页状态栏显示为背景色 dynamicsWaterfallFlow = 'dynamicsWaterfallFlow', // 动态瀑布流 upPanelPosition = 'upPanelPosition', // up主面板位置 dynamicsShowAllFollowedUp = 'dynamicsShowAllFollowedUp', // 动态显示全部关注up