ux(provisioning): up-arrow inside landscape diagram, drop accent fill
Render both orientation diagrams in black so neither orientation looks privileged-by-default — the previous yellow/green active highlight on landscape was redundant once the supported orientation was clear from the rest of the layout, and dropping it cleans up the centre panel. Communicate "this edge is up" with a filled up-arrow inside the landscape screen instead of relying on color. Setup screen (green Step 2/2) inherits the same change since orientation_diagrams is shared between gen_ap and gen_setup. show_active_ls / accent params kept on the function signature for call-site stability but no longer drive any colour decisions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
+23
-12
@@ -109,9 +109,23 @@ def text_center(draw, cx, y, text, font, fill):
|
|||||||
tw = bb[2]-bb[0]
|
tw = bb[2]-bb[0]
|
||||||
draw.text((cx - tw//2, y), text, font=font, fill=fill)
|
draw.text((cx - tw//2, y), text, font=font, fill=fill)
|
||||||
|
|
||||||
|
def up_arrow(draw, cx, cy, half_w=12, h=22, color=BK):
|
||||||
|
"""Solid filled triangle pointing up, centered on (cx, cy)."""
|
||||||
|
draw.polygon([
|
||||||
|
(cx, cy - h // 2), # tip
|
||||||
|
(cx - half_w, cy + h // 2), # base left
|
||||||
|
(cx + half_w, cy + h // 2), # base right
|
||||||
|
], fill=color)
|
||||||
|
|
||||||
|
|
||||||
def orientation_diagrams(draw, accent, show_active_ls=True):
|
def orientation_diagrams(draw, accent, show_active_ls=True):
|
||||||
"""Draw both orientation diagrams in the centre panel.
|
"""Draw both orientation diagrams in the centre panel.
|
||||||
accent = RGB colour for the active / ribbon highlights."""
|
|
||||||
|
The accent / show_active_ls parameters are kept for call-site
|
||||||
|
compatibility but no longer drive any colour decisions — both
|
||||||
|
diagrams render in black so neither orientation looks privileged.
|
||||||
|
The supported orientation is communicated by the up-arrow inside
|
||||||
|
the landscape screen instead."""
|
||||||
cx = CTR_X + CTR_W // 2 # 410
|
cx = CTR_X + CTR_W // 2 # 410
|
||||||
|
|
||||||
# ── Section title ─────────────────────────────────────────────
|
# ── Section title ─────────────────────────────────────────────
|
||||||
@@ -122,21 +136,18 @@ def orientation_diagrams(draw, accent, show_active_ls=True):
|
|||||||
ls_x, ls_y, ls_w, ls_h = CTR_X+43, BODY_Y+52, 110, 66
|
ls_x, ls_y, ls_w, ls_h = CTR_X+43, BODY_Y+52, 110, 66
|
||||||
rib_w, rib_h = 110, 10
|
rib_w, rib_h = 110, 10
|
||||||
|
|
||||||
text_center(draw, cx, ls_y-14, "LANDSCAPE", F_LABEL, accent if show_active_ls else BK)
|
text_center(draw, cx, ls_y-14, "LANDSCAPE", F_LABEL, BK)
|
||||||
|
|
||||||
ls_border = accent if show_active_ls else BK
|
draw.rectangle([ls_x, ls_y, ls_x+ls_w-1, ls_y+ls_h-1], outline=BK, width=3)
|
||||||
draw.rectangle([ls_x, ls_y, ls_x+ls_w-1, ls_y+ls_h-1], outline=ls_border, width=3)
|
draw.rectangle([ls_x, ls_y+ls_h, ls_x+rib_w-1, ls_y+ls_h+rib_h-1], fill=BK)
|
||||||
rib_rgb = accent if show_active_ls else BK
|
|
||||||
draw.rectangle([ls_x, ls_y+ls_h, ls_x+rib_w-1, ls_y+ls_h+rib_h-1], fill=rib_rgb)
|
|
||||||
|
|
||||||
if show_active_ls:
|
# Up arrow inside the landscape screen — communicates "this edge is up"
|
||||||
# check badge
|
# so the user can position the frame correctly even though we no longer
|
||||||
bx, by = cx-9, ls_y+ls_h+rib_h+5
|
# use color to flag landscape as the supported mode.
|
||||||
draw.rectangle([bx, by, bx+18, by+18], fill=accent)
|
up_arrow(draw, ls_x + ls_w // 2, ls_y + ls_h // 2, half_w=14, h=26)
|
||||||
text_center(draw, bx+9, by+3, "✓", F_CHIP, BK)
|
|
||||||
|
|
||||||
# Thin separator
|
# Thin separator
|
||||||
sep_y = ls_y + ls_h + rib_h + (30 if show_active_ls else 14)
|
sep_y = ls_y + ls_h + rib_h + 14
|
||||||
draw.rectangle([CTR_X+10, sep_y, CTR_X+CTR_W-10, sep_y], fill=(180,180,175))
|
draw.rectangle([CTR_X+10, sep_y, CTR_X+CTR_W-10, sep_y], fill=(180,180,175))
|
||||||
|
|
||||||
# ── Portrait ──────────────────────────────────────────────────
|
# ── Portrait ──────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user