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