fix(README): with corrected example code (#6151)

This commit is contained in:
Tilen Majerle
2024-05-03 09:08:41 +02:00
committed by GitHub
parent 67fad672e3
commit 10e0d5facf

View File

@@ -124,7 +124,7 @@ lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MA
/*Create a white label, set its text and align it to the center*/ /*Create a white label, set its text and align it to the center*/
lv_obj_t * label = lv_label_create(lv_screen_active()); lv_obj_t * label = lv_label_create(lv_screen_active());
lv_label_set_text(label, "Hello world"); lv_label_set_text(label, "Hello world");
lv_obj_set_style_text_color(lv_screen_active(), lv_color_hex(0xffffff), LV_PART_MAIN); lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_PART_MAIN);
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
``` ```
</details> </details>