Remove max_size usage with displayio.Group

Remove max_glyphs usage with Display_Text Label
This commit is contained in:
James Carr 2021-08-03 16:18:34 +01:00
parent 57110f0379
commit 168135262a
2 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ GRAY = 0x888888
LABEL_OFFSET = 290
# Make the display context
calc_group = displayio.Group(max_size=25)
calc_group = displayio.Group()
board.DISPLAY.show(calc_group)
# Make a background color fill
@ -68,7 +68,7 @@ def find_button(label):
return result
border = Rect(20, 8, 280, 35, fill=WHITE, outline=BLACK, stroke=2)
calc_display = Label(font, text="0", color=BLACK, max_glyphs=MAX_DIGITS)
calc_display = Label(font, text="0", color=BLACK)
calc_display.y = 25
clear_button = add_button(0, 0, "AC")

View file

@ -33,7 +33,7 @@ ts = adafruit_touchscreen.Touchscreen(board.TOUCH_XL, board.TOUCH_XR,
size=(SCREEN_WIDTH, SCREEN_HEIGHT))
# Make the display context
calc_group = displayio.Group(max_size=25)
calc_group = displayio.Group()
board.DISPLAY.show(calc_group)
# Make a background color fill
@ -75,7 +75,7 @@ def find_button(label):
return result
border = Rect(int(SCREEN_WIDTH/18), 8, (LABEL_OFFSET), 35, fill=WHITE, outline=BLACK, stroke=2)
calc_display = Label(font, text="0", color=BLACK, max_glyphs=MAX_DIGITS)
calc_display = Label(font, text="0", color=BLACK)
calc_display.y = 25
clear_button = add_button(0, 0, "AC")