mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: v/b status
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -126,14 +126,14 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
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: '隐藏状态栏、撑满屏幕,但播放控件仍处于安全域内',
|
||||
|
||||
@@ -81,7 +81,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
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<VideoDetailPage>
|
||||
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<VideoDetailPage>
|
||||
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<VideoDetailPage>
|
||||
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<VideoDetailPage>
|
||||
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<VideoDetailPage>
|
||||
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,
|
||||
|
||||
@@ -842,28 +842,24 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
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: <Widget>[
|
||||
Container(
|
||||
height: 34.0,
|
||||
width: 28.0,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Icon(
|
||||
Icon(
|
||||
_volumeValue.value == 0.0
|
||||
? Icons.volume_off
|
||||
: _volumeValue.value < 0.5
|
||||
@@ -872,18 +868,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
color: const Color(0xFFFFFFFF),
|
||||
size: 20.0,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
const SizedBox(width: 2.0),
|
||||
Text(
|
||||
'${(_volumeValue.value * 100.0).round()}%',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 13.0,
|
||||
color: Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -896,28 +888,24 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
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: <Widget>[
|
||||
Container(
|
||||
height: 30.0,
|
||||
width: 28.0,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Icon(
|
||||
Icon(
|
||||
_brightnessValue.value < 1.0 / 3.0
|
||||
? Icons.brightness_low
|
||||
: _brightnessValue.value < 2.0 / 3.0
|
||||
@@ -926,19 +914,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
color: const Color(0xFFFFFFFF),
|
||||
size: 18.0,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 2.0),
|
||||
Expanded(
|
||||
child: Text(
|
||||
Text(
|
||||
'${(_brightnessValue.value * 100.0).round()}%',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 13.0,
|
||||
color: Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user