Skip to content

Commit ec44ab0

Browse files
committed
Use board.Display.width and height in settings
1 parent 03b547a commit ec44ab0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PyPortal_Calculator/titano_code.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
Coords = namedtuple("Point", "x y")
1515

1616
# Settings
17-
SCREEN_WIDTH = 480
18-
SCREEN_HEIGHT = 320
17+
SCREEN_WIDTH = board.DISPLAY.width
18+
SCREEN_HEIGHT = board.DISPLAY.height
1919
BUTTON_WIDTH = int(SCREEN_WIDTH / 5) # was 60
2020
BUTTON_HEIGHT = int(SCREEN_WIDTH / 10) # was 30
2121
BUTTON_MARGIN = 8
@@ -131,4 +131,4 @@ def find_button(label):
131131
if button not in ('+', '-', 'x', '/') or button != calculator.get_current_operator():
132132
b.selected = False
133133
button = ""
134-
time.sleep(0.05)
134+
time.sleep(0.05)

0 commit comments

Comments
 (0)