WP-136: Portrait cover slots in the TV grid
Status: ✅ Done (2026-12-02), every exit criterion met. Fork PR
barefootbetters/scummvm#64
merged on 2026-12-02 (merge commit 1fbc5d5439), private PR
barefootbetters/scooby-engine-private#88
the same day (squash f49a272). The TV runs 26041072 with portrait slots
(§Result). Decision D1 answered by Jeff on 2026-12-02
(§Decisions).
Phase: 5 (polish & distribution).
Depends on:
- WP-135 ✅: the grid’s own colours, which the mockup and this packet build on.
- WP-132 ✅: the covers and the pack they ship in.
- WP-104 (🚧): the TV app’s theme. Its open criteria don’t touch this packet.
Unblocks: whole box fronts on the TV, the first of the code items the
redesign’s TV mockup needs.
Companion EC: — (the steps fit in §Execution).
Pre-flight: required. The packet adds a commit to the fork’s shared GUI
code (gui/widgets/grid.cpp) and changes what the TV build packages, as
WP-132 and WP-135 did.
Targets generation(s): none. The grid and the theme are
engine-independent.
Estimated effort: half a day: the fork commit, the theme and pack, one
TV build and the checks.
Goal
The TV grid shows each game’s whole box front. Its cover slots are portrait, and a cover of any shape sits at the bottom of its slot, centred, like boxes on a shelf. The tile behind the cover, the badges, the dimming of a missing game and the selection ring follow the cover, not the empty slot above it. One brand-free fork commit lets a theme ask for that; a theme that doesn’t draws the grid as today.
Background
- The mockup. The private redesign page’s 1920×1080 TV mockup, composited on 2026-12-02 from the real covers, draws the whole box fronts. Only Phantom’s front is portrait (714 × 1000, the UK GSP edition); Showdown’s US box and ScummVM’s Beneath a Steel Sky icon are square. Hence one portrait slot holding covers of mixed shapes.
- What the code does today (fork
origin/scooby-engine0af756551f):- The slot is square:
_thumbnailHeight = _thumbnailWidth(gui/widgets/grid.cpp:1269). - A cover is scaled to fit the slot, keeping its shape (
scaleGfx,grid.cpp:468-487), and drawn at the slot’s top left plus the margin (grid.cpp:130). - The tile behind the cover (
kThumbnailBackground,grid.cpp:112-114), the platform and flag badges (grid.cpp:135-149), the demo overlay and the dimming of a missing game (grid.cpp:151-166) are all placed on the slot. - The selection ring (
griditem_hover_bg) spans the whole item, slot and title (grid.cpp:93-99).
- The slot is square:
- Why a theme can’t do it. None of the above reads the theme. The
Globals.Grid.*layout variables cover only spacing, titles and the thumbnail margin (gui/themes/common/highres_layout.stx:83-91).
Scope
In scope
- The fork commit, brand-free. A new optional layout variable,
Globals.Grid.ThumbnailHeightPercent: the slot’s height as a percentage of its width. When a theme defines it:- the slot is that tall (140 gives a 5:7 box);
- each cover is drawn at the bottom of the slot, centred across it;
- the tile behind it, the badges, the demo overlay and the dimming use the cover’s rectangle;
- the selection ring starts at the cover’s top.
When a theme doesn’t define it, nothing changes: square slots, covers at the top left, everything placed on the slot. No stock theme file changes.
- The TV theme, in the private
assemble_theme.py:Grid.ThumbnailHeightPercent = 140, Phantom’s whole front. - The TV pack: Phantom’s cover becomes the whole box front
(512 × 717 from the 714 × 1000 source, nothing cropped), and
New-ThumbnailPack.ps1accepts covers 512 wide and 512 to 768 tall. The README’s cover specification and the manifest say so. - The TV build, installed over 26041071 with
adb install -r(the app’s data and games stay), and captures.
Out of scope
- The rest of the mockup: three per row and the smaller header (three per row needs the smaller header, or a portrait row is taller than today’s panel), no badges, the remote legend, the header controls and the button row. Each is on the redesign page’s list.
- Titles still cut at two lines at four per row; that’s the three-per-row change.
- The Windows preview, which needs a rebuild to show it.
- Upstream submission.
Decisions
Answered by Jeff on 2026-12-02 (DECISIONS.md).
- D1, the slot: portrait, with the covers bottom-aligned, as the mockup draws it. Not today’s square slot with Phantom cropped or letterboxed. Answered: “Portrait, bottom-aligned”.
Dependencies
- The fork at
origin/scooby-engine; a worktree fromtools/New-ForkWorktree.ps1 -Branch wp-136-grid-portrait-slots. - The private repo’s
tv-app-identity(assemble_theme.py,Build-TvAppTheme.ps1,New-ThumbnailPack.ps1,thumbnails/source/). - WSL’s Android build tree as in WP-135.
- The TCL 65Q77K over Windows
adb, on 26041071 (2026.4.1-wp135.1).
Execution
- Pre-flight, recorded in
docs/reference/pre-flight-WP-136-<date>.md. - The fork commit on
wp-136-grid-portrait-slots. - The theme and pack: the variable in the generated layout, Phantom’s
whole front, the pack script,
Build-TvAppTheme.ps1andNew-ThumbnailPack.ps1. - The TV build and install: versionCode 26041072,
2026.4.1-wp136.1. - Captures on the TCL: the grid with Phantom selected; with a square
cover selected; 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 file. - On the TCL with the TV theme, measured in a capture: the slots are 1.4 times as tall as wide; Phantom’s whole front fills its slot; the square covers sit at the slot’s bottom, centred, with ecru above them; the ring around a square cover starts at the cover’s top; the badges sit on the covers.
- On the TCL with the stock Remastered theme, the grid is as before: square
slots, covers at the top, the ring round the whole item.
scummvm.iniis byte-identical after the check. - No “Missing data asset” or layout warnings in
logcatfrom the change. - The private PR with the theme, the pack and the rebuilt assets is merged.
Deliverables
- Fork: one commit in
gui/(PR onbarefootbetters/scummvm). - Private:
assemble_theme.py, the regenerated theme,tvapp.zip, the cover, the pack script, the pack, the README and manifest, 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.
Result
Drafted, pre-flighted and run on 2026-12-02 in one session (pre-flight-WP-136-2026-12-02).
- Fork: one commit on
wp-136-grid-portrait-slots, fromscooby-engine @ 0af756551f:33213e3fd4,GUI: Let themes give grid slots their own height(gui/widgets/grid.{h,cpp}). Fork PR barefootbetters/scummvm#64, merged on 2026-12-02 as1fbc5d5439; the fork worktree and its branch are removed. - Private:
barefootbetters/scooby-engine-private#88,
merged on 2026-12-02 as
f49a272(squash): the variable in the TV theme’s layout, Phantom’s whole front (512 × 717), the pack script, the rebuilttvapp.zipand pack, and the captures on the redesign page. - The TV runs versionCode 26041072 (
2026.4.1-wp136.1), built in WSL as WP-135 and installed over 26041071 withadb install -r.
How it works
GridWidget::reflowLayout()checkshasVar("Globals.Grid.ThumbnailHeightPercent"). If the theme sets it, the slot is that percentage of its width tall and_thumbnailsBottomAlignedis set; otherwise the slot is square, as before.GridItemWidget::drawWidget()works out the cover’s rectangle: the slot, or, with bottom alignment and a loaded cover, the cover’s own size plus the margin, centred across the bottom of the slot. The cover’s tile, the cover, the platform and language icons, the demo overlay, the dimming (a sub-surface of the slot-sized overlay) and the top of the selection ring use that rectangle.- The demo overlay is rendered square (
_extraIconHeight = _thumbnailWidth), as it is drawn on the cover. With square slots that’s the size it was.
Checked
- Build: two files synced into WP-135’s tree;
grid.orecompiled with no warnings in the changed files. - The TV theme at four per row, measured in the captures: every cover’s bottom is at y = 694. The square covers’ tiles are 279 × 278 px, centred in their slots, with ecru above. Phantom’s whole front fills its slot (tile 279 × 380). With Showdown selected, the ring starts just above its cover, not at the top of the slot. With Beneath a Steel Sky selected, the same. The flags and platform badges sit on the covers’ corners.
- The stock Remastered theme (through
run-asinscummvm.ini): square slots, covers at the top, the ring round the whole item, as before. Phantom’s portrait front is narrower in its square slot than the old square crop.scummvm.iniwas byte-identical to its backup afterwards (SHA-25695FFF6A5…1334C). logcat: no “Missing data asset” and no layout warnings over three launches.- Private PR merged.
Noted, not changed
- The first row sits 14 px higher (covers from y = 315, not 329), so
Phantom’s ring meets the panel’s top border.
GridWidget::scrollToEntrykeeps room for the tray (_trayHeight, three lines) under the selected item. A portrait row plus that room is taller than today’s panel, so the grid scrolls a little. The smaller header on the redesign page’s list gives the panel the height back. - Titles are still cut at two lines at four per row. Three per row fixes it, but at three per row a portrait row is taller than today’s panel, so it waits for the smaller header.