feat: 产品更名「时序图设计器」+ 亮色图标 + 工具栏适配 1920x1080 + 对话框等比缩放 + 默认周期 3.6s

- 产品名:时序图设计器 Sequence Diagram Studio(窗口标题/帮助关于/README/RC/素材同步)
- 图标改为亮色渐变+白色时钟,深色任务栏下清晰可见
- 工具栏新增紧凑布局(图标化/导出菜单),1920x1080 及 150% 缩放(1280 逻辑宽)下完整显示
- 对话框以 1920x1080 为基准等比放大(<=1.75x),更小窗口不缩小
- 默认循环周期 2400ms -> 3600ms(3.6s = 360°)
- 重新构建 dist
This commit is contained in:
呆头鹅
2026-09-18 17:14:27 +08:00
parent 550cebc172
commit 89cc3189cc
18 changed files with 248 additions and 163 deletions
+29 -43
View File
@@ -4,6 +4,9 @@
A clock / cycle dial that reflects the product spirit: one turn = one cycle,
12 o'clock origin, clockwise phase progression.
Design note: the badge uses a **bright cyan→violet gradient** with a **white
clock** so the icon stays legible on both light and dark taskbars.
Outputs:
windows/runner/resources/app_icon.ico (multi-size, for the Windows build)
demo/app-icon.png (1024px preview)
@@ -18,15 +21,12 @@ OUT_ICO = os.path.join(ROOT, "windows", "runner", "resources", "app_icon.ico")
OUT_PNG = os.path.join(ROOT, "demo", "app-icon.png")
S = 1024
BG_TOP = (14, 21, 32, 255)
BG_BOT = (11, 16, 24, 255)
LINE = (31, 44, 64, 255)
ACCENT = (76, 201, 240, 255)
ACCENT2 = (124, 92, 255, 255)
OK = (52, 211, 153, 255)
DIAL = (12, 19, 32, 255)
TICK = (42, 58, 82, 255)
TEXT = (232, 238, 252, 255)
BG_TOP = (76, 201, 240, 255) # #4CC9F0 cyan
BG_BOT = (124, 92, 255, 255) # #7C5CFF violet
WHITE = (255, 255, 255, 255)
WHITE_SOFT = (255, 255, 255, 170)
NAVY = (11, 16, 24, 255) # #0B1018
EDGE = (255, 255, 255, 90)
def lerp(a, b, t):
@@ -49,21 +49,10 @@ def polar(cx, cy, r, deg):
return (cx + r * math.cos(t), cy + r * math.sin(t))
def arc(draw, cx, cy, r, a0, a1, color, width):
draw.arc(
[cx - r, cy - r, cx + r, cy + r],
start=a0 - 90,
end=a1 - 90,
fill=color,
width=width,
)
def build_master():
img = Image.new("RGBA", (S, S), (0, 0, 0, 0))
draw = ImageDraw.Draw(img)
# Rounded-square body with a vertical gradient.
# Bright gradient body.
body = Image.new("RGBA", (S, S), (0, 0, 0, 0))
bd = ImageDraw.Draw(body)
for y in range(S):
@@ -71,50 +60,47 @@ def build_master():
mask = rounded_mask(S, 210, inset=48)
img.paste(body, (0, 0), mask)
# Inner border ring.
draw = ImageDraw.Draw(img)
# Subtle inner edge to separate from the taskbar.
draw.rounded_rectangle(
[48, 48, S - 1 - 48, S - 1 - 48],
radius=210,
outline=LINE,
width=6,
outline=EDGE,
width=5,
)
cx = cy = S // 2
r_ring = 320
ring_w = 46
r_ring = 300
ring_w = 40
# Dial disc.
# White outer ring (the cycle).
draw.ellipse(
[cx - r_ring - ring_w // 2, cy - r_ring - ring_w // 2,
cx + r_ring + ring_w // 2, cy + r_ring + ring_w // 2],
fill=DIAL,
outline=LINE,
width=4,
outline=WHITE,
width=ring_w,
)
# 12 / 3 / 6 / 9 major ticks.
# 12 tick marks; 12/3/6/9 are longer and thicker.
for d in range(0, 360, 30):
major = d % 90 == 0
r1 = r_ring - 96
r2 = r_ring - (52 if major else 74)
col = ACCENT if major else TICK
w = 14 if major else 9
draw.line([polar(cx, cy, r1, d), polar(cx, cy, r2, d)], fill=col, width=w)
draw.line(
[polar(cx, cy, r1, d), polar(cx, cy, r2, d)],
fill=WHITE if major else WHITE_SOFT,
width=16 if major else 9,
)
# Phase arcs on the outer ring: two "actions" of the cycle.
arc(draw, cx, cy, r_ring, 0, 70, ACCENT, ring_w)
arc(draw, cx, cy, r_ring, 105, 190, ACCENT2, ring_w)
arc(draw, cx, cy, r_ring, 300, 360, OK, ring_w)
# Clock hands: classic 10:10 pose.
for r, deg, col, w in ((168, 305, TEXT, 34), (238, 55, ACCENT, 26)):
# Clock hands: classic 10:10 pose, navy for contrast on white.
for r, deg, col, w in ((170, 305, NAVY, 34), (240, 55, NAVY, 26)):
hx, hy = polar(cx, cy, r, deg)
draw.line([(cx, cy), (hx, hy)], fill=col, width=w)
draw.ellipse([hx - w / 2, hy - w / 2, hx + w / 2, hy + w / 2], fill=col)
# Hub.
draw.ellipse([cx - 30, cy - 30, cx + 30, cy + 30], fill=TEXT)
draw.ellipse([cx - 13, cy - 13, cx + 13, cy + 13], fill=DIAL)
draw.ellipse([cx - 30, cy - 30, cx + 30, cy + 30], fill=NAVY)
draw.ellipse([cx - 12, cy - 12, cx + 12, cy + 12], fill=WHITE)
return img