♻️ refactor(gui): improve left panel readability with better fonts, colors, and layout

- Replace Segoe UI with Roboto for cross-platform compatibility
- Increase font sizes for better readability (9→11, 11→12, 14→15)
- Update dark theme to VS Code-like colors (#1E1E1E bg)
- Brighten accent colors and improve contrast ratios
- Fix StepHeader: number circle background, status icon positioning
- Enlarge accent bar (4→5px) and buttons (28→32px)
- Simplify status text (Completed → Done)
- Improve connector line sizing and alignment
This commit is contained in:
Jeremy Shen
2026-06-09 17:12:41 +08:00
parent 5277c88e3d
commit bda64d5f46
3 changed files with 139 additions and 78 deletions
+15 -14
View File
@@ -42,6 +42,7 @@ from gui.styles import (
DANGER_COLOR,
INFO_COLOR,
CONNECTOR_COLOR,
STEP_ICON_SIZE,
get_theme,
)
from gui.widgets import (
@@ -190,16 +191,17 @@ class MainWindow(ctk.CTk):
row=0, column=0, sticky="nsew",
padx=PADDING, pady=PADDING,
)
panel.grid_rowconfigure(9, weight=1)
panel.grid_rowconfigure(10, weight=1)
# ── Title ──
title = ctk.CTkLabel(
panel,
text="Workflow",
font=FONT_HEADING,
)
title.grid(row=0, column=0, padx=PADDING, pady=PADDING)
title.grid(row=0, column=0, padx=PADDING, pady=(PADDING, PADDING_SMALL))
# Step definitions with descriptions
# ── Steps ──
step_defs = [
{"num": 1, "title": "Check Environment", "desc": "Verify tools & connectivity"},
{"num": 2, "title": "Program & Verify Flash", "desc": "Wipe, program, and verify flash"},
@@ -207,7 +209,6 @@ class MainWindow(ctk.CTk):
{"num": 4, "title": "Load Main Program", "desc": "TFTP upload, reboot, verify boot"},
]
# Create step headers with callbacks
self._steps = []
self._step_statuses = {}
for i, defn in enumerate(step_defs):
@@ -217,24 +218,24 @@ class MainWindow(ctk.CTk):
title=defn["title"],
description=defn["desc"],
callback=lambda idx=i: self._execute_step(idx),
can_run=(i == 0), # First step always runnable
can_run=(i == 0),
)
self._steps.append(step)
self._step_statuses[i] = "pending"
# Add connector line between steps
# Connector line between steps
if i > 0:
connector = ctk.CTkFrame(
panel,
width=2,
height=8,
width=3,
height=12,
fg_color=CONNECTOR_COLOR,
corner_radius=1,
corner_radius=2,
)
connector.grid(
row=i * 2, column=0,
sticky="n",
padx=(PADDING_SMALL + 24 + PADDING_SMALL, PADDING_SMALL),
padx=(PADDING_SMALL + STEP_ICON_SIZE + PADDING_SMALL, PADDING_SMALL),
)
# Position step
@@ -245,16 +246,16 @@ class MainWindow(ctk.CTk):
pady=PADDING_SMALL,
)
# Progress indicator
# ── Progress indicator ──
self._progress = ProgressIndicator(panel)
self._progress.grid(
row=8, column=0,
sticky="nsew",
padx=PADDING,
pady=PADDING,
pady=(PADDING, PADDING_SMALL),
)
# Run button
# ── Run All button ──
self._run_btn = ctk.CTkButton(
panel,
text="▶ Run All Steps",
@@ -267,7 +268,7 @@ class MainWindow(ctk.CTk):
row=9, column=0,
sticky="nsew",
padx=PADDING,
pady=PADDING,
pady=PADDING_SMALL,
)
def _build_log_panel(self, parent: ctk.CTkFrame) -> None: