mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 采用更准确的配置描述
This commit is contained in:
@@ -29,7 +29,7 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
int? _lastSelectTime; //上次点击时间
|
int? _lastSelectTime; //上次点击时间
|
||||||
Box setting = GStrorage.setting;
|
Box setting = GStrorage.setting;
|
||||||
late bool enableMYBar;
|
late bool enableMYBar;
|
||||||
late bool adaptiveNavBar;
|
late bool useSideBar;
|
||||||
late bool enableGradientBg;
|
late bool enableGradientBg;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -39,8 +39,8 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
_mainController.pageController =
|
_mainController.pageController =
|
||||||
PageController(initialPage: _mainController.selectedIndex);
|
PageController(initialPage: _mainController.selectedIndex);
|
||||||
enableMYBar = setting.get(SettingBoxKey.enableMYBar, defaultValue: true);
|
enableMYBar = setting.get(SettingBoxKey.enableMYBar, defaultValue: true);
|
||||||
adaptiveNavBar =
|
useSideBar =
|
||||||
setting.get(SettingBoxKey.adaptiveNavBar, defaultValue: false);
|
setting.get(SettingBoxKey.useSideBar, defaultValue: false);
|
||||||
enableGradientBg = setting.get(SettingBoxKey.enableGradientBg,
|
enableGradientBg = setting.get(SettingBoxKey.enableGradientBg,
|
||||||
defaultValue: true);
|
defaultValue: true);
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (adaptiveNavBar) ...[
|
if (useSideBar) ...[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 55,
|
width: 55,
|
||||||
child: NavigationRail(
|
child: NavigationRail(
|
||||||
@@ -205,7 +205,7 @@ class _MainAppState extends State<MainApp> with SingleTickerProviderStateMixin {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
bottomNavigationBar: adaptiveNavBar
|
bottomNavigationBar: useSideBar
|
||||||
? null
|
? null
|
||||||
: StreamBuilder(
|
: StreamBuilder(
|
||||||
stream: _mainController.hideTabBar
|
stream: _mainController.hideTabBar
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class _StyleSettingState extends State<StyleSetting> {
|
|||||||
title: '改用侧边栏',
|
title: '改用侧边栏',
|
||||||
subTitle: '开启后底栏被替换,且底栏相关设置失效',
|
subTitle: '开启后底栏被替换,且底栏相关设置失效',
|
||||||
leading: Icon(Icons.chrome_reader_mode_outlined),
|
leading: Icon(Icons.chrome_reader_mode_outlined),
|
||||||
setKey: SettingBoxKey.adaptiveNavBar,
|
setKey: SettingBoxKey.useSideBar,
|
||||||
defaultVal: false,
|
defaultVal: false,
|
||||||
),
|
),
|
||||||
const SetSwitchItem(
|
const SetSwitchItem(
|
||||||
@@ -136,7 +136,7 @@ class _StyleSettingState extends State<StyleSetting> {
|
|||||||
const SetSwitchItem(
|
const SetSwitchItem(
|
||||||
title: '播放页移除安全边距',
|
title: '播放页移除安全边距',
|
||||||
subTitle: '隐藏状态栏、撑满屏幕,但播放控件仍处于安全域内',
|
subTitle: '隐藏状态栏、撑满屏幕,但播放控件仍处于安全域内',
|
||||||
leading: Icon(Icons.crop_outlined),
|
leading: Icon(Icons.fit_screen_outlined),
|
||||||
setKey: SettingBoxKey.videoPlayerRemoveSafeArea,
|
setKey: SettingBoxKey.videoPlayerRemoveSafeArea,
|
||||||
defaultVal: false,
|
defaultVal: false,
|
||||||
needReboot: true,
|
needReboot: true,
|
||||||
@@ -153,7 +153,8 @@ class _StyleSettingState extends State<StyleSetting> {
|
|||||||
dense: false,
|
dense: false,
|
||||||
title: Text('动态页Up主显示位置', style: titleStyle),
|
title: Text('动态页Up主显示位置', style: titleStyle),
|
||||||
leading: const Icon(Icons.person_outlined),
|
leading: const Icon(Icons.person_outlined),
|
||||||
subtitle: Text('当前:${upPanelPosition.labels}', style: subTitleStyle),
|
subtitle:
|
||||||
|
Text('当前:${upPanelPosition.labels}', style: subTitleStyle),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
UpPanelPosition? result = await showDialog(
|
UpPanelPosition? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Grid {
|
|||||||
// if (screenWidthOffset != null) {
|
// if (screenWidthOffset != null) {
|
||||||
// screenWidth -= screenWidthOffset;
|
// screenWidth -= screenWidthOffset;
|
||||||
// }
|
// }
|
||||||
// if (GStrorage.setting.get(SettingBoxKey.adaptiveNavBar, defaultValue: false) as bool) {
|
// if (GStrorage.setting.get(SettingBoxKey.useSideBar, defaultValue: false) as bool) {
|
||||||
// screenWidth -= 55;
|
// screenWidth -= 55;
|
||||||
// }
|
// }
|
||||||
// int columnCount = ((screenWidth - crossAxisSpacing) / (maxCrossAxisExtent + crossAxisSpacing)).ceil();
|
// int columnCount = ((screenWidth - crossAxisSpacing) / (maxCrossAxisExtent + crossAxisSpacing)).ceil();
|
||||||
|
|||||||
@@ -180,10 +180,10 @@ class SettingBoxKey {
|
|||||||
enableSingleRow = 'enableSingleRow', // 首页单列
|
enableSingleRow = 'enableSingleRow', // 首页单列
|
||||||
displayMode = 'displayMode',
|
displayMode = 'displayMode',
|
||||||
maxRowWidth = 'maxRowWidth', // 首页列最大宽度(dp)
|
maxRowWidth = 'maxRowWidth', // 首页列最大宽度(dp)
|
||||||
videoPlayerRemoveSafeArea = 'videoPlayerHideStatusBar',
|
videoPlayerRemoveSafeArea = 'videoPlayerRemoveSafeArea', // 视频播放器移除安全边距
|
||||||
dynamicsWaterfallFlow = 'dynamicsWaterfallFlow', // 动态瀑布流
|
dynamicsWaterfallFlow = 'dynamicsWaterfallFlow', // 动态瀑布流
|
||||||
upPanelPosition = 'upPanelPosition', // up主面板位置
|
upPanelPosition = 'upPanelPosition', // up主面板位置
|
||||||
adaptiveNavBar = 'adaptiveNavBar',
|
useSideBar = 'useSideBar',
|
||||||
enableMYBar = 'enableMYBar',
|
enableMYBar = 'enableMYBar',
|
||||||
hideSearchBar = 'hideSearchBar', // 收起顶栏
|
hideSearchBar = 'hideSearchBar', // 收起顶栏
|
||||||
hideTabBar = 'hideTabBar', // 收起底栏
|
hideTabBar = 'hideTabBar', // 收起底栏
|
||||||
|
|||||||
Reference in New Issue
Block a user