From d621655e5ce865a457b078a5122779ca57600011 Mon Sep 17 00:00:00 2001 From: James Carr Date: Tue, 27 Jul 2021 22:37:08 +0100 Subject: [PATCH] Remove max_size usage with displayio.Group Remove max_glyphs usage with Display_Text Label --- CLUE_Metronome/clue_metronome.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CLUE_Metronome/clue_metronome.py b/CLUE_Metronome/clue_metronome.py index 49f67bdc8..dc6925040 100644 --- a/CLUE_Metronome/clue_metronome.py +++ b/CLUE_Metronome/clue_metronome.py @@ -16,7 +16,7 @@ clue.display.brightness = 1.0 clue.pixel.brightness = 0.2 -screen = displayio.Group(max_size=11) +screen = displayio.Group() TEAL = 0x009E98 LT_TEAL = 0x000F0F GRAY = 0x02403E @@ -40,7 +40,7 @@ # title text title_label = label.Label( - terminalio.FONT, text="Metronome", scale=4, color=TEAL, max_glyphs=11 + terminalio.FONT, text="Metronome", scale=4, color=TEAL ) title_label.x = 14 title_label.y = 26 @@ -48,7 +48,7 @@ # interval text interval_label = label.Label( - terminalio.FONT, text=("{} BPM".format(tempo)), scale=5, color=WHITE, max_glyphs=7 + terminalio.FONT, text="{} BPM".format(tempo), scale=5, color=WHITE ) interval_label.x = 20 interval_label.y = 95 @@ -65,10 +65,9 @@ # Signature text sig_label = label.Label( terminalio.FONT, - text=("{}/4".format(time_signature)), + text="{}/4".format(time_signature), scale=3, color=BLACK, - max_glyphs=3, ) sig_label.x = 30 sig_label.y = 160 @@ -76,7 +75,7 @@ # play text play_label = label.Label( - terminalio.FONT, text=(" play"), scale=3, color=BLACK, max_glyphs=5 + terminalio.FONT, text=" play", scale=3, color=BLACK ) play_label.x = 138 play_label.y = 160 @@ -88,7 +87,7 @@ # increment label increment_label = label.Label( - terminalio.FONT, text=("-1 +1"), scale=3, color=GRAY, max_glyphs=8 + terminalio.FONT, text="-1 +1", scale=3, color=GRAY ) increment_label.x = 3 increment_label.y = 220