Gamerig Library: fit the screen without scrolling, draw over the wallpaper
CI / test (push) Successful in 2m32s

The grid picks the roomiest card density that fits (fewer description and hint lines, narrower
cards, then name and buttons only) before it would scroll. The module now draws over the
desktop wallpaper with glassy panels and cards; Background setting Wallpaper (default) or Solid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
This commit is contained in:
Claude committed 2026-11-26 03:14:18 +00:00
1 parent f556df2f4b
commit 1154437050
5 files changed
+133 -31

No files matched your search

+20
View File
@@ -169,3 +169,23 @@ test "disconnected: says it is waiting, and the error" {
assert_true(t.contains("Waiting for the library daemon…"))
assert_true(t.contains("Library daemon not reachable"))
}
///|
test "nine games fit a 1280x720 desktop without scrolling, and the wallpaper shows through" {
let lib = @gamelib.Library::new()
let base = sample_state().games[1]
let games = Array::makei(9, i => { ..base, id: "g" + i.to_string(), featured: i < 2 })
let ops = lib.render(games, [], @gamelib.Rig::unknown(), { w: 1280, h: 720 }, tokens())
assert_true(lib.content_h <= lib.view_h, msg="grid \{lib.content_h} > view \{lib.view_h}")
// No opaque full-screen background in the default Wallpaper mode.
match ops[0] {
FillRect(f) => assert_true(f.rect.h != 720 || f.color.a.to_int() < 255)
_ => ()
}
assert_true(lib.set_config("background", "Solid"))
let ops = lib.render(games, [], @gamelib.Rig::unknown(), { w: 1280, h: 720 }, tokens())
match ops[0] {
FillRect(f) => assert_eq(f.color.a.to_int(), 255)
_ => fail("no background")
}
}