mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
opt: style settings
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -31,7 +31,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
final ColorSelectController colorSelectController =
|
||||
Get.put(ColorSelectController());
|
||||
|
||||
late ThemeType _tempThemeValue;
|
||||
late double maxRowWidth;
|
||||
late UpPanelPosition upPanelPosition;
|
||||
|
||||
@@ -40,7 +39,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tempThemeValue = settingController.themeType.value;
|
||||
maxRowWidth =
|
||||
setting.get(SettingBoxKey.maxRowWidth, defaultValue: 240.0) as double;
|
||||
upPanelPosition = UpPanelPosition.values[setting.get(
|
||||
@@ -299,14 +297,13 @@ class _StyleSettingState extends State<StyleSetting> {
|
||||
builder: (context) {
|
||||
return SelectDialog<ThemeType>(
|
||||
title: '主题模式',
|
||||
value: _tempThemeValue,
|
||||
value: settingController.themeType.value,
|
||||
values: ThemeType.values.map((e) {
|
||||
return {'title': e.description, 'value': e};
|
||||
}).toList());
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
_tempThemeValue = result;
|
||||
settingController.themeType.value = result;
|
||||
setting.put(SettingBoxKey.themeMode, result.index);
|
||||
Get.forceAppUpdate();
|
||||
|
||||
Reference in New Issue
Block a user