Gamerig Library: its own smooth gradient backdrop under the glass by default
CI / test (push) Successful in 7m13s

The desktop wallpaper's logo showing through the cards looked like a glitch. Background
now offers Gradient (default: 4 px bands with faint amber and blue glows), Wallpaper and 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:29:54 +00:00
1 parent 02c831576a
commit 2960005139
4 files changed
+49 -7

No files matched your search

+9 -2
View File
@@ -171,13 +171,20 @@ test "disconnected: says it is waiting, and the error" {
}
///|
test "nine games fit a 1280x720 desktop without scrolling, and the wallpaper shows through" {
test "nine games fit a 1280x720 desktop without scrolling; gradient, wallpaper and solid backdrops" {
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.
// The default Gradient backdrop: even 4 px bands, no full-screen fill.
match ops[0] {
FillRect(f) => assert_eq(f.rect.h, 4)
_ => fail("no gradient")
}
// Over the desktop wallpaper: no opaque full-screen background.
assert_true(lib.set_config("background", "Wallpaper"))
let ops = lib.render(games, [], @gamelib.Rig::unknown(), { w: 1280, h: 720 }, tokens())
match ops[0] {
FillRect(f) => assert_true(f.rect.h != 720 || f.color.a.to_int() < 255)
_ => ()