🐛 fix(gui): resolve step header layout overlaps and improve scaling
- Fix 6 overlapping widget bugs in StepHeader (title/desc, btn/icon, run/rerun) with proper 5-column grid layout - Merge run/rerun buttons into single _action_btn with state-driven text - Fix DARK_CARD NameError (undefined import → STEP_CARD_BG) - Replace fragile vertical connector lines with full-width dividers - Add panel.grid_columnconfigure(0, weight=1) for horizontal scaling - Unify button text across all states (▶ pending/disabled, ↻ retry) - Tighten padding and reduce whitespace between steps
This commit is contained in:
+11
-12
@@ -42,7 +42,6 @@ from gui.styles import (
|
||||
DANGER_COLOR,
|
||||
INFO_COLOR,
|
||||
CONNECTOR_COLOR,
|
||||
STEP_ICON_SIZE,
|
||||
get_theme,
|
||||
)
|
||||
from gui.widgets import (
|
||||
@@ -189,9 +188,10 @@ class MainWindow(ctk.CTk):
|
||||
panel = ctk.CTkFrame(parent, corner_radius=CORNER_RADIUS)
|
||||
panel.grid(
|
||||
row=0, column=0, sticky="nsew",
|
||||
padx=PADDING, pady=PADDING,
|
||||
padx=PADDING, pady=(PADDING, 0),
|
||||
)
|
||||
panel.grid_rowconfigure(10, weight=1)
|
||||
panel.grid_columnconfigure(0, weight=1)
|
||||
|
||||
# ── Title ──
|
||||
title = ctk.CTkLabel(
|
||||
@@ -199,7 +199,7 @@ class MainWindow(ctk.CTk):
|
||||
text="Workflow",
|
||||
font=FONT_HEADING,
|
||||
)
|
||||
title.grid(row=0, column=0, padx=PADDING, pady=(PADDING, PADDING_SMALL))
|
||||
title.grid(row=0, column=0, padx=PADDING_SMALL, pady=(PADDING_SMALL, PADDING_SMALL))
|
||||
|
||||
# ── Steps ──
|
||||
step_defs = [
|
||||
@@ -223,19 +223,18 @@ class MainWindow(ctk.CTk):
|
||||
self._steps.append(step)
|
||||
self._step_statuses[i] = "pending"
|
||||
|
||||
# Connector line between steps
|
||||
# Divider line between steps
|
||||
if i > 0:
|
||||
connector = ctk.CTkFrame(
|
||||
divider = ctk.CTkFrame(
|
||||
panel,
|
||||
width=3,
|
||||
height=12,
|
||||
height=1,
|
||||
fg_color=CONNECTOR_COLOR,
|
||||
corner_radius=2,
|
||||
)
|
||||
connector.grid(
|
||||
divider.grid(
|
||||
row=i * 2, column=0,
|
||||
sticky="n",
|
||||
padx=(PADDING_SMALL + STEP_ICON_SIZE + PADDING_SMALL, PADDING_SMALL),
|
||||
sticky="ew",
|
||||
padx=PADDING,
|
||||
pady=(2, 0),
|
||||
)
|
||||
|
||||
# Position step
|
||||
@@ -243,7 +242,7 @@ class MainWindow(ctk.CTk):
|
||||
row=i * 2 + 1, column=0,
|
||||
sticky="nsew",
|
||||
padx=PADDING_SMALL,
|
||||
pady=PADDING_SMALL,
|
||||
pady=(0, 2),
|
||||
)
|
||||
|
||||
# ── Progress indicator ──
|
||||
|
||||
Reference in New Issue
Block a user