From b94b3f666b74ee92362efcdb91eb7fa81bc2707b Mon Sep 17 00:00:00 2001 From: ZhuJHua <1624109111@qq.com> Date: Sun, 15 Dec 2024 21:15:10 +0800 Subject: [PATCH] refactor(ui): improve ui --- lib/pages/home/diary/diary_view.dart | 1 + lib/pages/home/setting/setting_view.dart | 2 ++ lib/utils/data/pref.dart | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/home/diary/diary_view.dart b/lib/pages/home/diary/diary_view.dart index d52592d..3c52224 100644 --- a/lib/pages/home/diary/diary_view.dart +++ b/lib/pages/home/diary/diary_view.dart @@ -154,6 +154,7 @@ class DiaryPage extends StatelessWidget { showDragHandle: true, useSafeArea: true); }, + tooltip: '数据同步', icon: const Icon(Icons.cloud_sync_outlined), ); }), diff --git a/lib/pages/home/setting/setting_view.dart b/lib/pages/home/setting/setting_view.dart index bd99784..5ebf52c 100644 --- a/lib/pages/home/setting/setting_view.dart +++ b/lib/pages/home/setting/setting_view.dart @@ -457,6 +457,8 @@ class SettingPage extends StatelessWidget { Expanded( child: ListView( cacheExtent: size.height * 2, + addAutomaticKeepAlives: false, + addRepaintBoundaries: false, padding: const EdgeInsets.all(4.0), children: [ buildDashboard(), diff --git a/lib/utils/data/pref.dart b/lib/utils/data/pref.dart index 6ce5dc0..29d270d 100644 --- a/lib/utils/data/pref.dart +++ b/lib/utils/data/pref.dart @@ -155,7 +155,7 @@ class PrefUtil { (color.b * 255).toInt()); } - await _prefs.setInt('color', _prefs.getInt('color') ?? (await ThemeUtil.supportDynamicColor() ? -1 : 0)); + await _prefs.setInt('color', _prefs.getInt('color') ?? (await ThemeUtil.supportDynamicColor() ? -1 : 4)); await _prefs.setInt('themeMode', _prefs.getInt('themeMode') ?? 0); await _prefs.setBool('dynamicColor', _prefs.getBool('dynamicColor') ?? true); await _prefs.setInt('quality', _prefs.getInt('quality') ?? 2);