feat(ui): 动作两端改为方头小圆角(长度即真实时长);更新图标按设计稿重绘

- 条形视图:动作条圆角 8→3,两端方头(仅小圆角),长度严格等于真实时长
- 圆周视图:动作弧改为填充弧带(方头 + 小圆角)替代圆头描边,
  消除「圆头端帽在两端各多出半个环宽」造成的长度误读
- SVG 导出同步:条块 rx=3、动作弧 stroke-linecap=butt,导出与屏幕一致
- 更新按钮图标按 docs/更新.svg 设计稿矢量重绘(圆环 + 上箭头 + 两条底座横杠),
  替换原来的 refresh 图标;更新对话框标题图标同步
- 右下角缩略预览(条形 / 圆周)动作线条细化至约 2px
- 版本 1.2.1+13
This commit is contained in:
2026-10-09 09:49:23 +08:00
parent c32be46adb
commit 81d0d1768a
15 changed files with 203 additions and 44 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ class SvgWriter {
final Color c = Color(a.color);
_b.write('<g id="${_esc(a.id)}" data-action="${_esc(a.id)}" data-start="${a.startAngle}" '
'data-duration="${a.durationAngle}" data-layer="${a.layer}" data-station="${_esc(a.stationId)}">');
_rect(r.left, r.top, r.width, r.height, fill: _hex(c), rx: 7, opacity: 0.92);
_rect(r.left, r.top, r.width, r.height, fill: _hex(c), rx: 3, opacity: 0.92);
_text(r.left + 8, r.center.dy + 4, '${a.name} ${tfmt(a.durationAngle / 360 * cycle, u)}',
color: _hex(tokens.arcText), size: 12, weight: '700');
_b.write('</g>');
@@ -231,7 +231,7 @@ class SvgWriter {
'data-duration="${a.durationAngle}" data-layer="${a.layer}" data-station="${_esc(a.stationId)}">');
for (final List<double> s in splitArcs(a.startAngle, a.endAngle)) {
final String d = _arc(c, r, s[0], s[1]);
_b.write('<path d="$d" fill="none" stroke="${_hex(col)}" stroke-width="$th" stroke-linecap="round"/>');
_b.write('<path d="$d" fill="none" stroke="${_hex(col)}" stroke-width="$th" stroke-linecap="butt"/>');
}
final Offset mp = polar(c, r, (a.startAngle + a.endAngle) / 2);
_text(mp.dx, mp.dy, '${a.id} ${a.name}', color: _hex(tokens.arcText), size: 12, anchor: 'middle', weight: '700');