@@ -77,26 +77,17 @@ def wday_to_weekday_name(tm_wday):
77
77
font_large .load_glyphs (b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ' )
78
78
font_small .load_glyphs (b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ()' )
79
79
80
-
81
- # Set up display group
82
- splash = displayio .Group (max_size = 10 ) # The Main Display Group
83
- view = displayio .Group (max_size = 15 ) # Group for Text objects
84
- splash .append (view )
85
-
86
80
# Set up label for the day
87
81
label_day = label .Label (font_large , color = 0xFFFFFF , max_glyphs = 200 )
88
- label_day .x = board .DISPLAY .width // 4
82
+ label_day .x = board .DISPLAY .width // 5
89
83
label_day .y = 70
90
- view .append (label_day )
84
+ pyportal . splash .append (label_day )
91
85
92
86
# Set up label for the time
93
87
label_time = label .Label (font_small , color = 0x538ab1 , max_glyphs = 200 )
94
88
label_time .x = board .DISPLAY .width // 4
95
89
label_time .y = 150
96
- view .append (label_time )
97
-
98
- # Show group splash
99
- board .DISPLAY .show (splash )
90
+ pyportal .splash .append (label_time )
100
91
101
92
refresh_time = None
102
93
while True :
@@ -118,7 +109,7 @@ def wday_to_weekday_name(tm_wday):
118
109
weekday = wday_to_weekday_name (the_time .tm_wday )
119
110
120
111
# set the day label's text
121
- label_day .text = "{}" . format ( weekday )
112
+ label_day .text = weekday
122
113
123
114
# set the time label's text
124
115
label_time .text = "({})" .format (time_name [the_time .tm_hour ])
0 commit comments