opt: card width

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-12 10:46:39 +08:00
parent 226d554249
commit 12a236f397
36 changed files with 92 additions and 61 deletions

View File

@@ -154,8 +154,8 @@ List<SettingsModel> get styleSettings => [
context: Get.context!,
builder: (context) {
return SlideDialog<double>(
title: '最大列宽度默认280dp',
value: GStorage.maxRowWidth,
title: '小卡最大列宽度默认240dp',
value: GStorage.smallCardWidth,
min: 150.0,
max: 500.0,
divisions: 35,
@@ -163,15 +163,41 @@ List<SettingsModel> get styleSettings => [
);
});
if (result != null) {
await GStorage.setting.put(SettingBoxKey.maxRowWidth, result);
await GStorage.setting.put(SettingBoxKey.smallCardWidth, result);
SmartDialog.showToast('重启生效');
setState();
}
},
leading: const Icon(Icons.calendar_view_week_outlined),
title: '列表宽度dp限制',
title: '小卡列表宽度dp限制',
getSubtitle: () =>
'当前:${GStorage.maxRowWidth.toInt()}dp屏幕宽度:${MediaQuery.of(Get.context!).size.width.toPrecision(2)}dp。宽度越小列数越多横条、大卡会2倍折算',
'当前:${GStorage.mediumCardWidth.toInt()}dp屏幕宽度:${MediaQuery.of(Get.context!).size.width.toPrecision(2)}dp。宽度越小列数越多',
),
SettingsModel(
settingsType: SettingsType.normal,
onTap: (setState) async {
double? result = await showDialog(
context: Get.context!,
builder: (context) {
return SlideDialog<double>(
title: '中卡最大列宽度默认280dp',
value: GStorage.mediumCardWidth,
min: 150.0,
max: 500.0,
divisions: 35,
suffix: 'dp',
);
});
if (result != null) {
await GStorage.setting.put(SettingBoxKey.mediumCardWidth, result);
SmartDialog.showToast('重启生效');
setState();
}
},
leading: const Icon(Icons.calendar_view_week_outlined),
title: '中卡列表宽度dp限制',
getSubtitle: () =>
'当前:${GStorage.mediumCardWidth.toInt()}dp屏幕宽度:${MediaQuery.of(Get.context!).size.width.toPrecision(2)}dp。宽度越小列数越多。',
),
SettingsModel(
settingsType: SettingsType.sw1tch,