From 043a25771672556aa8ac14618fef3b900a6817ec Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 28 Oct 2026 04:08:32 -0500 Subject: [PATCH] Testris: touch zones cover the board, not the whole screen On a wide display that can't turn, the board sits in the middle with space either side, and its touch targets fell in the middle column of a grid spread over the whole screen, so every target read as Drop or Down. --- lib/examples/testris.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/examples/testris.py b/lib/examples/testris.py index 9b69cc8..21311b0 100644 --- a/lib/examples/testris.py +++ b/lib/examples/testris.py @@ -256,6 +256,13 @@ class pal: grid_x_offset = border_x_offset + block_size grid_y_offset = border_y_offset + block_size + # The touch targets sit on the board's border, so the touch zones cover + # the board, not the whole screen. A wide display that couldn't turn + # leaves empty space either side of the board. + keypad.x = border_x_offset + keypad.w = border_width + keypad.key_width = border_width / keypad.cols + # Calculate the banner dimensions in pixels banner_width = border_width - ( block_size * 4