feat(ui): 动作两端改为方头小圆角(长度即真实时长);更新图标按设计稿重绘
- 条形视图:动作条圆角 8→3,两端方头(仅小圆角),长度严格等于真实时长 - 圆周视图:动作弧改为填充弧带(方头 + 小圆角)替代圆头描边, 消除「圆头端帽在两端各多出半个环宽」造成的长度误读 - SVG 导出同步:条块 rx=3、动作弧 stroke-linecap=butt,导出与屏幕一致 - 更新按钮图标按 docs/更新.svg 设计稿矢量重绘(圆环 + 上箭头 + 两条底座横杠), 替换原来的 refresh 图标;更新对话框标题图标同步 - 右下角缩略预览(条形 / 圆周)动作线条细化至约 2px - 版本 1.2.1+13
This commit is contained in:
@@ -763,20 +763,21 @@ class _MiniBarPainter extends CustomPainter {
|
||||
final double w = size.width - 4;
|
||||
// 行高按可用高度自适应,保证小预览里也排得下。
|
||||
final double pitch = n == 0 ? 12 : math.min(12, (size.height - 16) / n);
|
||||
final double rh = math.max(pitch - 3, 4);
|
||||
// 缩略图里的动作条只是一条细线(约 2px),并在行内垂直居中。
|
||||
final double rh = math.min(2.0, math.max(pitch * 0.5, 1.6));
|
||||
for (int i = 0; i < n; i++) {
|
||||
final Action a = project.actions[i];
|
||||
final double y = i * pitch;
|
||||
final double y = i * pitch + (pitch - rh) / 2;
|
||||
final double x1 = 2 + a.startAngle / 360 * w;
|
||||
final double x2 = 2 + math.min(a.endAngle, 360) / 360 * w;
|
||||
final RRect r = RRect.fromRectAndRadius(
|
||||
Rect.fromLTWH(x1, y, math.max(x2 - x1, 2), rh),
|
||||
const Radius.circular(2),
|
||||
Radius.circular(rh / 2),
|
||||
);
|
||||
canvas.drawRRect(r, Paint()..color = Color(a.color).withValues(alpha: 0.9));
|
||||
if (a.wrap) {
|
||||
canvas.drawRRect(
|
||||
RRect.fromRectAndRadius(Rect.fromLTWH(2, y, (a.endAngle - 360) / 360 * w, rh), const Radius.circular(2)),
|
||||
RRect.fromRectAndRadius(Rect.fromLTWH(2, y, (a.endAngle - 360) / 360 * w, rh), Radius.circular(rh / 2)),
|
||||
Paint()..color = Color(a.color).withValues(alpha: t.tailOp),
|
||||
);
|
||||
}
|
||||
@@ -865,7 +866,8 @@ class _MiniCircularPainter extends CustomPainter {
|
||||
final double maxR = math.max(math.min(size.width, size.height) / 2 - 24, 24);
|
||||
final double r0 = n <= 1 ? maxR * 0.6 : maxR * 0.34;
|
||||
final double pitch = n <= 1 ? 0 : (maxR - r0) / (n - 1);
|
||||
final double pw = (pitch == 0 ? 10.0 : pitch * 0.5).clamp(6.0, 13.0);
|
||||
// 缩略图里的环与动作弧只需一条细线(约 2px)。
|
||||
final double pw = 2.0;
|
||||
canvas.drawCircle(c, r0 + (n - 1) * pitch + pw / 2, Paint()..color = t.dial);
|
||||
for (int i = 0; i < n; i++) {
|
||||
final Action a = project.actions[i];
|
||||
|
||||
Reference in New Issue
Block a user