@@ -77,26 +77,17 @@ def wday_to_weekday_name(tm_wday):
7777font_large .load_glyphs (b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ' )
7878font_small .load_glyphs (b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ()' )
7979
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-
8680# Set up label for the day
8781label_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
8983label_day .y = 70
90- view .append (label_day )
84+ pyportal . splash .append (label_day )
9185
9286# Set up label for the time
9387label_time = label .Label (font_small , color = 0x538ab1 , max_glyphs = 200 )
9488label_time .x = board .DISPLAY .width // 4
9589label_time .y = 150
96- view .append (label_time )
97-
98- # Show group splash
99- board .DISPLAY .show (splash )
90+ pyportal .splash .append (label_time )
10091
10192refresh_time = None
10293while True :
@@ -118,7 +109,7 @@ def wday_to_weekday_name(tm_wday):
118109 weekday = wday_to_weekday_name (the_time .tm_wday )
119110
120111 # set the day label's text
121- label_day .text = "{}" . format ( weekday )
112+ label_day .text = weekday
122113
123114 # set the time label's text
124115 label_time .text = "({})" .format (time_name [the_time .tm_hour ])
0 commit comments