|
13 | 13 | from adafruit_bitmap_font import bitmap_font |
14 | 14 |
|
15 | 15 | clue.display.brightness = 1.0 |
16 | | -homescreen_screen = displayio.Group(max_size=3) |
17 | | -temperatures_screen = displayio.Group(max_size=2) |
| 16 | +homescreen_screen = displayio.Group() |
| 17 | +temperatures_screen = displayio.Group() |
18 | 18 |
|
19 | 19 | # define custom colors |
20 | 20 | GREEN = 0x00D929 |
|
44 | 44 |
|
45 | 45 | title_font = bitmap_font.load_font("/font/GothamBlack-50.bdf") |
46 | 46 | title_font.load_glyphs("BQLUE".encode("utf-8")) |
47 | | -title_label = label.Label(title_font, text="BBQLUE", color=clue.ORANGE, max_glyphs=15) |
| 47 | +title_label = label.Label(title_font, text="BBQLUE", color=clue.ORANGE) |
48 | 48 | title_label.x = 12 |
49 | 49 | title_label.y = 120 |
50 | 50 | homescreen_screen.append(title_label) |
|
66 | 66 |
|
67 | 67 | my_labels = {} # dictionary of configured my_labels |
68 | 68 |
|
69 | | -text_group = displayio.Group(max_size=8, scale=1) |
| 69 | +text_group = displayio.Group() |
70 | 70 |
|
71 | 71 | for label_config in my_labels_config: |
72 | 72 | (name, text, color, x, y) = label_config # unpack a tuple into five var names |
73 | | - templabel = label.Label(temp_font, text=text, color=color, max_glyphs=15) |
| 73 | + templabel = label.Label(temp_font, text=text, color=color) |
74 | 74 | templabel.x = x |
75 | 75 | templabel.y = y |
76 | 76 | my_labels[name] = templabel |
77 | 77 | text_group.append(templabel) |
78 | 78 |
|
79 | 79 | temperatures_screen.append(text_group) |
80 | 80 |
|
81 | | -temp_title_label = label.Label( |
82 | | - title_font, text="BBQLUE", color=clue.ORANGE, max_glyphs=15 |
83 | | -) |
| 81 | +temp_title_label = label.Label(title_font, text="BBQLUE", color=clue.ORANGE) |
84 | 82 | temp_title_label.x = 12 |
85 | 83 | temp_title_label.y = 30 |
86 | 84 | temperatures_screen.append(temp_title_label) |
|
0 commit comments