mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
fix(core/ui): fix off-by-one in in_area
This commit is contained in:
parent
8eb4bcff29
commit
e6c42b7fa6
@ -209,7 +209,7 @@ def grid(
|
|||||||
|
|
||||||
def in_area(area: Area, x: int, y: int) -> bool:
|
def in_area(area: Area, x: int, y: int) -> bool:
|
||||||
ax, ay, aw, ah = area
|
ax, ay, aw, ah = area
|
||||||
return ax <= x <= ax + aw and ay <= y <= ay + ah
|
return ax <= x < ax + aw and ay <= y < ay + ah
|
||||||
|
|
||||||
|
|
||||||
# Component events. Should be different from `io.TOUCH_*` events.
|
# Component events. Should be different from `io.TOUCH_*` events.
|
||||||
|
Loading…
Reference in New Issue
Block a user