mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom app font weight
Closes #533 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -146,6 +146,37 @@ List<SettingsModel> get styleSettings => [
|
||||
defaultVal: false,
|
||||
needReboot: true,
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: 'App字体字重',
|
||||
subtitle: '点击设置',
|
||||
setKey: SettingBoxKey.appFontWeight,
|
||||
defaultVal: false,
|
||||
onTap: () {
|
||||
showDialog<double>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
title: 'App字体字重',
|
||||
value: GStorage.appFontWeight.toDouble() + 1,
|
||||
min: 1,
|
||||
max: FontWeight.values.length.toDouble(),
|
||||
divisions: FontWeight.values.length - 1,
|
||||
);
|
||||
},
|
||||
).then((res) async {
|
||||
if (res != null) {
|
||||
await GStorage.setting
|
||||
.put(SettingBoxKey.appFontWeight, res.toInt() - 1);
|
||||
Get.forceAppUpdate();
|
||||
}
|
||||
});
|
||||
},
|
||||
leading: const Icon(Icons.text_fields),
|
||||
onChanged: (value) {
|
||||
Get.forceAppUpdate();
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: 'MD3样式底栏',
|
||||
|
||||
Reference in New Issue
Block a user