feat(ui): 更新按钮图标改为通用语义

- 空闲态:环形箭头 Icons.refresh(「检查更新」的中文软件通用图标)
- 检测到新版本:切换为下载图标 Icons.download + 红色角标
- 更新对话框标题图标同步为下载图标
This commit is contained in:
2026-10-08 21:32:51 +08:00
parent 0ce50d4b8d
commit 238a7e9dd9
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -458,11 +458,18 @@ class _AppShellState extends State<AppShell> {
} }
} }
/// 更新检查按钮:检测到新版本时叠加红色角标。 /// 更新检查按钮。
///
/// 空闲态用环形箭头(检查更新,中文软件的通用语义);
/// 检测到新版本时换成下载图标并叠加红色角标,一眼可辨「有新版本可下载」。
Widget _updateBtn(Tokens t) { Widget _updateBtn(Tokens t) {
final UpdateInfo? info = _update; final UpdateInfo? info = _update;
final Widget btn = _iconBtn(t, Icons.system_update_alt, _openUpdate, final Widget btn = _iconBtn(
tooltip: info == null ? '检查更新' : '发现新版本 v${info.version}'); t,
info == null ? Icons.refresh : Icons.download,
_openUpdate,
tooltip: info == null ? '检查更新' : '发现新版本 v${info.version}',
);
if (info == null) return btn; if (info == null) return btn;
return Badge(backgroundColor: t.danger, smallSize: 8, child: btn); return Badge(backgroundColor: t.danger, smallSize: 8, child: btn);
} }
+1 -1
View File
@@ -197,7 +197,7 @@ class _UpdateDialogState extends State<UpdateDialog> {
// 标题 // 标题
Row( Row(
children: <Widget>[ children: <Widget>[
Icon(Icons.system_update_alt, size: 21, color: t.accent), Icon(Icons.download, size: 21, color: t.accent),
const SizedBox(width: 8), const SizedBox(width: 8),
Text('发现新版本 v${info.version}', Text('发现新版本 v${info.version}',
style: TextStyle(color: t.text, fontSize: 17, fontWeight: FontWeight.w700)), style: TextStyle(color: t.text, fontSize: 17, fontWeight: FontWeight.w700)),