- OnOff is 50 x 28 dp (was 64 x 34), same focus ring. - High scores: a game not played yet shows N/A in each column. - ProgrammeLengthsTest: three programmes 40 s over all play in full at exactly 2 minutes' drift; a fourth squeezes the next film's credits. - design/settings: five plain sections, presets, one Other TVs list (approved). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
226 lines
11 KiB
Python
226 lines
11 KiB
Python
"""Settings for everyone (Paul, 12 November 2026): "simple for a user... categorised easily, someone who may not be tech
|
||
gifted, multi room tidy up and focused in". Design only, for his approval; nothing here is in the app yet.
|
||
|
||
Today's Settings has five sections, but On screen alone holds 18 switches, many only make sense to us (Squeeze-back,
|
||
Special ident sound, See The Chase), and Rooms and phones mixes pairing, syncing and backups. This keeps every option, and
|
||
changes how they're reached:
|
||
|
||
- Five sections in plain words, each with one line on what it's for: Watching, Channels, Family, Other TVs and phones, Help
|
||
and account.
|
||
- Everyday choices first, as whole sentences with the current answer showing ("Subtitles: Automatic").
|
||
- The 18 presentation switches become one choice of three styles (Full TV feel, A little, Just the programmes). Every
|
||
switch is still there under "Choose each one", grouped and explained, for whoever wants it.
|
||
- Other TVs and phones is one list: this TV, each other TV with how up to date it is, each phone, and two buttons.
|
||
- Smaller switches (50 x 28, as in 0.129 r6) with the words On and Off beside them, so the state never rests on colour.
|
||
|
||
Frames are 1920 x 1080 SVG made with the layouts' helpers, converted with figcraft-cli to editable .figcraft and PNG.
|
||
Room names, phones and times are MOCK DATA, labelled on each frame.
|
||
|
||
Run: python3 design/settings/build-settings.py
|
||
"""
|
||
import importlib.util
|
||
from pathlib import Path
|
||
|
||
HERE = Path(__file__).resolve().parent
|
||
spec = importlib.util.spec_from_file_location("layouts1", HERE.parent / "layouts" / "build-layouts.py")
|
||
L = importlib.util.module_from_spec(spec); spec.loader.exec_module(L)
|
||
L.HERE = HERE # frames go to design/settings/frames
|
||
|
||
NAVY, PANEL, BLUE, GOLD, MUTED, WHITE, INK, MINT = L.NAVY, L.PANEL, L.BLUE, L.GOLD, L.MUTED, L.WHITE, L.INK, L.MINT
|
||
BODY, COND = L.BODY, L.COND
|
||
SECTIONS = [
|
||
("Watching", "Subtitles, sound and how Orbit looks", "entertainment"),
|
||
("Channels", "Which channels are on, and your own", "all"),
|
||
("Family", "Who's watching, the PIN, and kids", "family"),
|
||
("Other TVs and phones", "Your other TVs, and your phone as a remote", "rooms"),
|
||
("Help and account", "Your server, signing out, and help", "account"),
|
||
]
|
||
|
||
|
||
def masthead(f, where, trail=None):
|
||
f.g("Masthead")
|
||
f.img(96, 44, 220, 56, L.LOGO["orbit"], "Orbit logo")
|
||
f.text(360, 88, "Settings" if trail is None else f"Settings › {trail}", 40, MUTED if trail else WHITE, BODY, 600, id="Where you are")
|
||
if trail: f.text(360, 150, where, 52, WHITE, BODY, 700, id="Page title")
|
||
f.text(1824, 88, "18:42", 52, WHITE, COND, 500, "end")
|
||
f.end()
|
||
|
||
|
||
def switch(f, x, y, on, focused=False):
|
||
"""The 0.129 r6 switch, drawn at 1080p scale (x1.5 of its dp size), with its state in words beside it."""
|
||
f.g("Switch")
|
||
w, h = 75, 42
|
||
if focused: f.rect(x - 6, y - 6, w + 12, h + 12, "none", rx=27, stroke=GOLD, sw=5, id="Focus ring")
|
||
f.rect(x, y, w, h, MINT if on else "#283C64", rx=21)
|
||
f.rect(x + (39 if on else 5), y + 5, 32, 32, WHITE, rx=16, id="Thumb")
|
||
f.text(x - 18, y + 31, "On" if on else "Off", 28, WHITE if on else MUTED, BODY, 600, "end", id="State")
|
||
f.end()
|
||
|
||
|
||
def row(f, y, title, line, value=None, on=None, focused=False, h=112, id=None):
|
||
f.g(id or f"Row {title}")
|
||
f.rect(560, y, 1264, h, GOLD if focused else PANEL, rx=14)
|
||
ink, sub = (NAVY, NAVY) if focused else (WHITE, MUTED)
|
||
f.text(596, y + 50, title, 36, ink, BODY, 700)
|
||
if line: f.text(596, y + 90, line, 26, sub, BODY, 500)
|
||
if value is not None:
|
||
f.text(1784, y + h / 2 + 12, value + " ›", 32, ink, BODY, 600, "end", id="Current answer")
|
||
if on is not None:
|
||
switch(f, 1709, y + h / 2 - 21, on, focused)
|
||
f.end()
|
||
|
||
|
||
def side(f, chosen):
|
||
f.g("Sections")
|
||
for i, (name, line, icon) in enumerate(SECTIONS):
|
||
y = 196 + i * 150
|
||
here = name == chosen
|
||
f.rect(96, y, 432, 132, WHITE if here else PANEL, rx=16, id=f"Section {name}")
|
||
f.img(124, y + 34, 64, 64, L.ICON[icon], f"Icon {name}")
|
||
f.text(208, y + 62, name if len(name) < 17 else name.replace(" and phones", ""), 34, NAVY if here else WHITE, BODY, 700)
|
||
f.text(208, y + 100, "You are here" if here else "", 24, NAVY, BODY, 500)
|
||
f.end()
|
||
|
||
|
||
def home():
|
||
f = Frame("settings-1-home", "Settings: five plain sections")
|
||
f.mock(y=130)
|
||
masthead(f, "Settings")
|
||
f.text(96, 160, "What would you like to change?", 40, INK, BODY, 500, id="Question")
|
||
f.g("Sections")
|
||
for i, (name, line, icon) in enumerate(SECTIONS):
|
||
col, r = i % 3, i // 3
|
||
w, h = 560, 300
|
||
x, y = 96 + col * (w + 24), 210 + r * (h + 28)
|
||
focused = i == 0
|
||
f.rect(x, y, w, h, GOLD if focused else PANEL, rx=20, id=f"Section {name}")
|
||
if focused:
|
||
f.ring(x, y, w, h, 20)
|
||
f.rect(x + 32, y + 32, 112, 112, NAVY, rx=16, id="Icon chip")
|
||
f.img(x + 44, y + 44, 88, 88, L.ICON[icon], f"Icon {name}")
|
||
f.text(x + 36, y + 206, name, 44, NAVY if focused else WHITE, BODY, 700)
|
||
f.text(x + 36, y + 252, line, 27, NAVY if focused else MUTED, BODY, 500)
|
||
# The sixth tile is a way back, not a setting.
|
||
x, y = 96 + 2 * 584, 210 + 328
|
||
f.rect(x, y, 560, 300, "none", rx=20, stroke=BLUE, sw=3, id="Back to TV")
|
||
f.text(x + 36, y + 206, "Back to TV", 44, WHITE, BODY, 700)
|
||
f.text(x + 36, y + 252, "Nothing changes until you choose", 27, MUTED, BODY, 500)
|
||
f.end()
|
||
f.hints([("◀ ▲ ▼ ▶", "Choose"), ("OK", "Open"), ("Back", "Back to TV")])
|
||
f.save()
|
||
|
||
|
||
def watching():
|
||
f = Frame("settings-2-watching", "Settings: Watching, everyday choices first")
|
||
f.mock(y=130)
|
||
masthead(f, "Watching", "Watching")
|
||
side(f, "Watching")
|
||
f.g("Everyday")
|
||
f.text(560, 230, "EVERYDAY", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 250, "Subtitles", "Automatic shows them when people speak another language", "Automatic", focused=True)
|
||
row(f, 376, "How Orbit looks", "Layout and colours", "Original, Night")
|
||
row(f, 502, "Quieter late at night", "From 11pm to 7am, Orbit's own sounds play softly", on=True)
|
||
f.end()
|
||
f.g("Style")
|
||
f.text(560, 676, "BETWEEN PROGRAMMES", 24, MUTED, BODY, 700, spacing=3)
|
||
styles = [("Full TV feel", "Idents, what's next, the cast"), ("A little", "Idents and what's next"), ("Just the programmes", "Nothing in between")]
|
||
for i, (t, line) in enumerate(styles):
|
||
x, w = 560 + i * 428, 408
|
||
chosen = i == 0
|
||
f.rect(x, 696, w, 150, WHITE if chosen else PANEL, rx=14, id=f"Style {t}")
|
||
f.rect(x + 24, 724, 30, 30, "none" if not chosen else NAVY, rx=15, stroke=NAVY if chosen else MUTED, sw=3, id="Choice dot")
|
||
if chosen: f.rect(x + 32, 732, 14, 14, WHITE, rx=7)
|
||
f.text(x + 70, 750, t, 32, NAVY if chosen else WHITE, BODY, 700)
|
||
f.text(x + 24, 810, line, 25, NAVY if chosen else MUTED, BODY, 500)
|
||
row(f, 870, "Choose each one", "Every switch, for idents, sounds, the cast and motion", "18 options", h=100, id="Row More")
|
||
f.end()
|
||
f.hints([("▲ ▼", "Move"), ("OK", "Change"), ("Back", "Sections")])
|
||
f.save()
|
||
|
||
|
||
def each_one():
|
||
f = Frame("settings-3-each-one", "Settings: Watching > Choose each one, grouped and explained")
|
||
f.mock(y=130)
|
||
masthead(f, "Choose each one", "Watching")
|
||
side(f, "Watching")
|
||
groups = [
|
||
("BETWEEN PROGRAMMES", [("Idents", "A short film for the channel between programmes", True),
|
||
("Coming up next", "A small card near the end says what's next", True),
|
||
("Credits squeeze", "The credits shrink, and what's next fills the screen", True)]),
|
||
("SOUND", [("Ident sounds", "Each channel's short sound, at most every 20 minutes", True),
|
||
("Keep them quiet", "Well under the programmes", False)]),
|
||
("THE CAST", [("Ollie, Zip, Blaze, Drift and Luna", "In the credits squeeze and promos", True)]),
|
||
]
|
||
y = 220
|
||
first = True
|
||
for heading, items in groups:
|
||
f.text(560, y, heading, 24, MUTED, BODY, 700, spacing=3); y += 20
|
||
for t, line, on in items:
|
||
row(f, y, t, line, on=on, focused=first, h=104); first = False; y += 116
|
||
y += 30
|
||
f.text(560, 1000, "Further down: Special idents, Promos, Mini shorts, Drive-In curtains, Reduce motion.", 26, MUTED, id="Scroll note")
|
||
f.hints([("▲ ▼", "Move"), ("OK", "Switch"), ("Back", "Watching")], y=1060)
|
||
f.save()
|
||
|
||
|
||
def rooms():
|
||
f = Frame("settings-4-other-tvs", "Settings: Other TVs and phones, one list")
|
||
f.mock(y=130)
|
||
masthead(f, "Other TVs and phones", "Other TVs and phones")
|
||
side(f, "Other TVs and phones")
|
||
f.g("This TV")
|
||
f.text(560, 230, "THIS TV", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 250, "Living room", "This TV's name, as your other TVs and phones see it", "Rename", focused=True)
|
||
f.end()
|
||
f.g("Your other TVs")
|
||
f.text(560, 420, "YOUR OTHER TVS", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 440, "Bedroom", "Up to date: profiles, the PIN and Continue watching match", "Synced 5 min ago")
|
||
f.end()
|
||
f.g("Phones")
|
||
f.text(560, 610, "PHONES", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 630, "Paul's phone", "A remote for this TV, with the guide and Catch Up", "Remove")
|
||
f.end()
|
||
f.g("Add")
|
||
for i, (t, line) in enumerate([("Add a TV", "Copies this TV's channels, profiles and look"), ("Connect a phone", "Scan a code; nothing to install")]):
|
||
x = 560 + i * 644
|
||
f.rect(x, 800, 620, 150, PANEL, rx=14, stroke=BLUE, sw=3, id=f"Button {t}")
|
||
f.text(x + 36, 862, "+ " + t, 38, WHITE, BODY, 700)
|
||
f.text(x + 36, 910, line, 26, MUTED, BODY, 500)
|
||
f.end()
|
||
f.text(560, 1000, "Backups and bringing settings in from another TV move to Help and account.", 26, MUTED, id="Design note")
|
||
f.hints([("▲ ▼", "Move"), ("OK", "Open"), ("Back", "Sections")], y=1060)
|
||
f.save()
|
||
|
||
|
||
def help_account():
|
||
f = Frame("settings-5-help", "Settings: Help and account")
|
||
f.mock(y=130)
|
||
masthead(f, "Help and account", "Help and account")
|
||
side(f, "Help and account")
|
||
f.g("Server")
|
||
f.text(560, 230, "YOUR SERVER", 24, MUTED, BODY, 700, spacing=3)
|
||
f.rect(560, 250, 1264, 150, PANEL, rx=14, id="Server card")
|
||
f.rect(596, 290, 22, 22, MINT, rx=11, id="Status dot")
|
||
f.text(634, 310, "Connected and healthy", 36, WHITE, BODY, 700)
|
||
f.text(596, 366, "media.example-server.net · answers in about a quarter of a second", 26, MUTED, BODY, 500)
|
||
f.end()
|
||
f.g("Help")
|
||
f.text(560, 450, "HELP", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 470, "Show me around", "The welcome tour again; nothing changes", "Start", focused=True)
|
||
row(f, 596, "Back up to a phone", "Keep a copy of your channels and profiles", "Back up")
|
||
f.end()
|
||
f.g("Account")
|
||
f.text(560, 770, "ACCOUNT", 24, MUTED, BODY, 700, spacing=3)
|
||
row(f, 790, "Sign out", "Your channels and schedules are kept for next time", "Sign out")
|
||
f.text(560, 960, "Remove this server, request counts and the version number sit under \"For the technical\" at the foot.", 26, MUTED, id="Design note")
|
||
f.end()
|
||
f.hints([("▲ ▼", "Move"), ("OK", "Open"), ("Back", "Sections")], y=1040)
|
||
f.save()
|
||
|
||
|
||
Frame = L.Frame
|
||
|
||
if __name__ == "__main__":
|
||
for make in (home, watching, each_one, rooms, help_account):
|
||
make()
|