WP-135: The TV grid’s own colours
Status: ✅ Done (2026-12-02), every exit criterion met. Fork PR
barefootbetters/scummvm#63
merged on 2026-12-02 (merge commit 0af756551f), private PR
barefootbetters/scooby-engine-private#85
the same day (squash 13378fc). The TV runs 26041071 with the ecru and violet
grid (§Result). Decisions D1 and D2 answered by Jeff on 2026-12-02
(§Decisions).
Phase: 5 (polish & distribution).
Depends on:
- WP-104 (🚧): the TV app’s theme and the private identity it ships in. Its open criteria (Help and a controller, licenses, splash) don’t touch this packet.
- WP-118 ✅: the grid is the TV default and takes the D-pad focus.
- WP-132 ✅: the covers the grid shows.
Unblocks: a TV launcher whose library stands apart from the app’s dark
chrome, ahead of the first store release
(WP-084).
Companion EC: — (the steps fit in §Execution).
Pre-flight: required. The packet adds a commit to the fork’s shared GUI
code (gui/, outside engines/terraglyph/) and changes what the TV build
packages, as WP-132 did.
Targets generation(s): none. The grid and the theme are
engine-independent.
Estimated effort: half a day: the fork commit, the theme, one TV build and
the checks.
Goal
The TV grid gets colours of its own. The library panel is ecru, the titles under the covers are dark, and the selected game has a violet ring and a violet title bar with light text. The rest of the app keeps today’s look. One brand-free fork commit lets a theme colour the grid apart from every other list; the TV app’s theme then sets those colours.
Background
- The ask. Jeff’s mockup
(
C:\pcloud\scooby-engine\UI-skins\scumm-reskin01.png, made from the 2026-12-01 TV capture) puts the grid on a tan panel. Copilot’s recommendation: a tan library, a rich purple selection ring and title bar with white text, dark plum titles, the chrome unchanged. The redesign notes are on the private repo’s UI redesign page. - Why a theme can’t do it today (fork
origin/scooby-engine837ca576da):- The grid’s panel is drawn by
ContainerWidget::drawWidget()withkWidgetBackgroundBorder(gui/widget.cpp:1265-1276, 1310-1312), which is thewidget_defaultdrawdata. Every list frame (gui/widgets/list.cpp:939-940) and container in the app draws the same drawdata, so a tanwidget_defaultturns every list tan. - The grid’s titles use
kFontColorNormal(gui/widgets/grid.cpp:180), thecolor_normaltext colour every label on the dark background uses. Dark titles would make those labels unreadable; off-white on tan is 1.64:1. - The selected title’s bar is
text_selection_focus(gui/ThemeEngine.cpp,drawText(), thekTextInversionFocuscase), which every focused list’s selected row also uses.
- The grid’s panel is drawn by
- What a theme can already do. The ring around a selected cover
(
griditem_hover_bg) and the cover-up rectangle behind each unselected item (griditem_bg) are grid-only drawdata (gui/widgets/grid.cpp:96-110). - How the engine falls back.
ThemeEngine::drawDD()returns without drawing when a theme doesn’t define a drawdata. Text colours a theme doesn’t define staynullptrin_textColors[].
Scope
In scope
-
The fork commit (D1), brand-free. The theme engine gets four optional entries, each with a fallback to what is drawn today:
New entry Kind Used for When the theme doesn’t define it grid_bgdrawdata the grid’s panel widget_defaultgriditem_title_focusdrawdata the selected title’s bar while the grid has focus text_selection_focuscolor_griditemtext colour the titles under the covers color_normalcolor_griditem_invertedtext colour the selected title on its bar color_normal_invertedGridWidgetdraws its panel with the new background type, andGridItemWidgetdraws valid titles with the new font colour. Unreachable games keepkFontColorAlternate. No stock theme file changes. - The TV theme (D2), in the private repo’s
assemble_theme.py:grid_bgandgriditem_bgin ecru#D7C481with a 1-unit violet border, the ring ingriditem_hover_bgand the bar ingriditem_title_focusin violet#592E59,color_griditemink#2A1A2A,color_griditem_invertedoff-white#FAFAFA. The ring keeps its 3-unit stroke. ThenBuild-TvAppTheme.ps1rebuildsassets/tvapp.zip. - The TV build, installed over 26041070 with
adb install -r(the app’s data, games and the WP-134 packages stay), and captures.
Out of scope
- Any other colour in the theme: the background, the buttons, the toolbar, the scrollbar and the list view stay as they are. The wider redesign (smaller logo, three per row, box-shaped covers, the remote legend) is on the private redesign page and needs its own packets.
- The Windows preview build (
tools/Start-TvAppPreview.ps1). It needs a rebuild with this commit before it can show the new theme; that happens the next time someone uses it. - Upstream submission. The entries are written so they could go upstream, but that’s a separate decision (upstream decision brief).
Decisions
Both answered by Jeff on 2026-12-02 (DECISIONS.md).
- D1, how: a small fork change that gives the grid its own panel and title colours, falling back to today’s look when a theme doesn’t set them. Not a theme-only compromise (a darker panel, keeping apple green), and not the fork change without a WP. Answered: “Small fork change (Recommended)”.
- D2, which colours: the brand palette’s ecru
#D7C481and violet#592E59(art brief §2), not Copilot’s proposed tan#D6C596and purple#713A79. Off-white#FAFAFAon violet is 10.27:1, the violet ring on ecru 6.18:1, ink on ecru 9.46:1. *Answered: “Brand ecru- violet (Recommended)”.*
Dependencies
- The fork at
origin/scooby-engine; a worktree fromtools/New-ForkWorktree.ps1 -Branch wp-135-grid-colours. - The private repo’s
tv-app-identity(assemble_theme.py,Build-TvAppTheme.ps1) and the brand art export on pCloud. - WSL’s Android build tree and toolchain as in WP-132 (FreeType, libpng,
armeabi-v7a, the identity from/opt/build/tv-app-identity). - The TCL 65Q77K over Windows
adb, on 26041070 (2026.4.1-wp132.6).
Execution
- Pre-flight, recorded in
docs/reference/pre-flight-WP-135-<date>.md. - The fork commit, one commit on
wp-135-grid-colours, with the fallbacks above. - The theme:
assemble_theme.pychanges,Build-TvAppTheme.ps1, the newtvapp_gfx.stxchecked for the four entries. - The TV build and install: versionCode 26041071,
2026.4.1-wp135.1. - Captures on the TCL: the grid with a selection; the list view; the
grid under the stock Remastered theme (set through
run-asinscummvm.ini, backed up first and restored byte for byte). - Close: fork PR, private PR, the redesign page, this WP and
WORK_INDEX.md.
Exit criteria
- The fork commit is merged on
scooby-engine. The Android build has no new warnings in the changed files. - On the TCL with the TV theme, measured in a capture: the grid panel and the space around unselected items are ecru; unselected titles are ink; the selected cover has a violet ring and a violet title bar with off-white text.
- On the TCL, the list view’s frame and selection are unchanged from 26041070 (violet frame, apple-green focused row).
- On the TCL with the stock Remastered theme, which defines none of the new
entries, the grid draws its panel, titles and selection as before.
scummvm.iniis byte-identical after the check. - Text pairs in the grid are at least 4.5:1 and the ring at least 3:1, computed from the capture’s pixels.
- The private PR with the theme change and the rebuilt
tvapp.zipis merged.
Deliverables
- Fork: one commit in
gui/(PR onbarefootbetters/scummvm). - Private:
assemble_theme.py, the regeneratedtheme/tvapp/,assets/tvapp.zip, the captures on the redesign page. - Public: this WP, its pre-flight, the
WORK_INDEX.mdrow, theDECISIONS.mdentry. Captures that show the app name stay private.
Notes
- Leak check. The fork commit and this repo carry no identity values (the app name, its distinctive word, the package id), as in EC-015.
- Focus colour. The grid’s focus moves from apple green to violet. The rest of the app keeps apple green for focus; the redesign page’s palette notes still apply there.
Result
Drafted, pre-flighted and run on 2026-12-02 in one session (pre-flight-WP-135-2026-12-02).
- Fork: one commit on
wp-135-grid-colours, fromscooby-engine @ dcf2630b21:ff83c9d4ca,GUI: Let themes give the grid its own background and title colors(gui/ThemeEngine.{h,cpp},gui/ThemeParser.cpp,gui/widgets/grid.cpp). Fork PR barefootbetters/scummvm#63, merged on 2026-12-02 as0af756551f; the fork worktree and its branch are removed. - Private:
barefootbetters/scooby-engine-private#85,
merged on 2026-12-02 as
13378fc(squash):assemble_theme.py, the regeneratedtvapp_gfx.stxandassets/tvapp.zip(308,009 bytes), and the captures on the redesign page. - The TV runs versionCode 26041071 (
2026.4.1-wp135.1), built in WSL as WP-132 and installed over 26041070 withadb install -r.
How it works
- Two new drawdata,
grid_bgandgriditem_title_focus, are in the defaults table but skipped by the “Missing data asset” check, so a theme may leave them out. GridWidgetdraws its panel with a new background type,kGridBackground. It drawsgrid_bgif the theme has it, elsewidget_defaultas before.- Valid titles use a new font colour,
kFontColorGridItem. It readscolor_griditem(inverted:color_griditem_inverted) and falls back tocolor_normal(color_normal_inverted). Disabled and hover states take the normal colours. Unreachable games keepkFontColorAlternate. - The focused title’s bar is
griditem_title_focuswhen the theme has it and the text is a grid title; otherwisetext_selection_focus.
Checked
- Build: the Android build (
armeabi-v7a, release) recompiledThemeEngine.o,ThemeParser.oandgrid.owith no warnings in the changed files. - The TV theme, sampled from a capture on the TCL: panel ecru
#D7C481; unselected titles ink#2A1A2A; the selected cover’s ring violet#592E59, 6 px on the 1080-line frame; its title bar violet with off-white#FAFAFAtext. - The list view is unchanged from 26041070: violet frame, apple-green focused row.
- The stock Remastered theme (set through
run-asinscummvm.ini): the grid draws Remastered’s cream panel, black titles and green title bar, as before.scummvm.iniwas byte-identical to its backup afterwards (SHA-25695FFF6A5…1334C). - Contrast, from the capture’s pixels: ink on ecru 9.46:1, off-white on violet 10.27:1, the ring on ecru 6.18:1.
- No “Missing data asset” warnings in
logcatover four launches, with either theme.
Noted, not changed
- The panel’s top border breaks above the gaps between covers, where each
item’s
griditem_bgrectangle overlaps it. The stock theme shows the same, so it’s the grid’s layout, not this packet. - The Windows preview (
tools/Start-TvAppPreview.ps1) needs a rebuild with the fork commit before it shows the new colours (out of scope, as planned).