@@ -334,7 +334,7 @@ def show_badge(self, *, background_color=0xFF0000, foreground_color=0xFFFFFF,
334
334
hello_label = Label (font = hello_font , text = hello_string )
335
335
(_ , _ , width , height ) = hello_label .bounding_box
336
336
hello_label .x = ((self .display .width // (2 * hello_scale )) - width // 2 )
337
- hello_label .y = int (height // ( 1.2 * hello_scale ))
337
+ hello_label .y = int (self . display . height * ( 0.117 / hello_scale ))
338
338
hello_label .color = background_text_color
339
339
hello_group .append (hello_label )
340
340
@@ -343,16 +343,16 @@ def show_badge(self, *, background_color=0xFF0000, foreground_color=0xFFFFFF,
343
343
my_name_is_label = Label (font = my_name_is_font , text = my_name_is_string )
344
344
(_ , _ , width , height ) = my_name_is_label .bounding_box
345
345
my_name_is_label .x = ((self .display .width // (2 * my_name_is_scale )) - width // 2 )
346
- my_name_is_label .y = int (height // (0.42 * my_name_is_scale ))
346
+ my_name_is_label .y = int (self . display . height * (0.28 / my_name_is_scale ))
347
347
my_name_is_label .color = background_text_color
348
348
my_name_is_group .append (my_name_is_label )
349
349
350
350
name_scale = name_scale
351
351
name_group = displayio .Group (scale = name_scale )
352
- name_label = Label (font = name_font , text = name_string )
352
+ name_label = Label (font = name_font , text = name_string , line_spacing = 0.75 )
353
353
(_ , _ , width , height ) = name_label .bounding_box
354
354
name_label .x = ((self .display .width // (2 * name_scale )) - width // 2 )
355
- name_label .y = int (height // (0.17 * name_scale ))
355
+ name_label .y = int (self . display . height * (0.65 / name_scale ))
356
356
name_label .color = foreground_text_color
357
357
name_group .append (name_label )
358
358
0 commit comments