@@ -260,29 +260,29 @@ def show_business_card(self, *, image_name=None, name_string=None, name_scale=1,
260
260
if name_string :
261
261
name_group = displayio .Group (scale = name_scale )
262
262
name_label = Label (name_font , text = name_string )
263
- (_ , _ , width , height ) = name_label .bounding_box
263
+ (_ , _ , width , _ ) = name_label .bounding_box
264
264
name_label .x = ((self .display .width // (2 * name_scale )) - width // 2 )
265
- name_label .y = int (height // (0.15 * name_scale ))
265
+ name_label .y = int (self . display . height * (0.73 / name_scale ))
266
266
name_label .color = 0xFFFFFF
267
267
name_group .append (name_label )
268
268
business_card_splash .append (name_group )
269
269
if email_string_one :
270
270
email_group_one = displayio .Group (scale = email_scale_one )
271
271
email_label_one = Label (email_font_one , text = email_string_one )
272
- (_ , _ , width , height ) = email_label_one .bounding_box
272
+ (_ , _ , width , _ ) = email_label_one .bounding_box
273
273
email_label_one .width = self .display .width
274
274
email_label_one .x = ((self .display .width // (2 * email_scale_one )) - width // 2 )
275
- email_label_one .y = int (height // (0.13 * email_scale_one ))
275
+ email_label_one .y = int (self . display . height * (0.84 / email_scale_one ))
276
276
email_label_one .color = 0xFFFFFF
277
277
email_group_one .append (email_label_one )
278
278
business_card_splash .append (email_group_one )
279
279
if email_string_two :
280
280
email_group_two = displayio .Group (scale = email_scale_two )
281
281
email_label_two = Label (email_font_two , text = email_string_two )
282
- (_ , _ , width , height ) = email_label_two .bounding_box
282
+ (_ , _ , width , _ ) = email_label_two .bounding_box
283
283
email_label_two .width = self .display .width
284
284
email_label_two .x = ((self .display .width // (2 * email_scale_two )) - width // 2 )
285
- email_label_two .y = int (height // (0.12 * email_scale_two ))
285
+ email_label_two .y = int (self . display . height * (0.91 / email_scale_two ))
286
286
email_label_two .color = 0xFFFFFF
287
287
email_group_two .append (email_label_two )
288
288
business_card_splash .append (email_group_two )
0 commit comments