dashboard: fix bringup screen text layout
This commit is contained in:
@@ -42,7 +42,8 @@ static void create_overland_boot_screen()
|
|||||||
lv_obj_t *subtitle = lv_label_create(screen);
|
lv_obj_t *subtitle = lv_label_create(screen);
|
||||||
lv_label_set_text(subtitle, "ESP32-S3 Dashboard Bring-Up");
|
lv_label_set_text(subtitle, "ESP32-S3 Dashboard Bring-Up");
|
||||||
lv_obj_set_style_text_color(subtitle, lv_color_hex(0xB8C0C8), 0);
|
lv_obj_set_style_text_color(subtitle, lv_color_hex(0xB8C0C8), 0);
|
||||||
lv_obj_set_style_text_font(subtitle, &lv_font_montserrat_30, 0);
|
lv_obj_set_width(subtitle, 760);
|
||||||
|
lv_obj_set_style_text_align(subtitle, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
lv_obj_align_to(subtitle, title, LV_ALIGN_OUT_BOTTOM_MID, 0, 12);
|
lv_obj_align_to(subtitle, title, LV_ALIGN_OUT_BOTTOM_MID, 0, 12);
|
||||||
|
|
||||||
lv_obj_t *card = lv_obj_create(screen);
|
lv_obj_t *card = lv_obj_create(screen);
|
||||||
@@ -65,8 +66,8 @@ static void create_overland_boot_screen()
|
|||||||
"Mode: Local dashboard bring-up"
|
"Mode: Local dashboard bring-up"
|
||||||
);
|
);
|
||||||
lv_obj_set_style_text_color(status, lv_color_hex(0xFFFFFF), 0);
|
lv_obj_set_style_text_color(status, lv_color_hex(0xFFFFFF), 0);
|
||||||
lv_obj_set_style_text_font(status, &lv_font_montserrat_30, 0);
|
|
||||||
lv_obj_set_style_text_line_space(status, 10, 0);
|
lv_obj_set_style_text_line_space(status, 10, 0);
|
||||||
|
lv_obj_set_width(status, 700);
|
||||||
lv_obj_align(status, LV_ALIGN_TOP_LEFT, 0, 0);
|
lv_obj_align(status, LV_ALIGN_TOP_LEFT, 0, 0);
|
||||||
|
|
||||||
lv_obj_t *button = lv_btn_create(card);
|
lv_obj_t *button = lv_btn_create(card);
|
||||||
@@ -76,19 +77,18 @@ static void create_overland_boot_screen()
|
|||||||
|
|
||||||
lv_obj_t *button_label = lv_label_create(button);
|
lv_obj_t *button_label = lv_label_create(button);
|
||||||
lv_label_set_text(button_label, "Touch Test");
|
lv_label_set_text(button_label, "Touch Test");
|
||||||
lv_obj_set_style_text_font(button_label, &lv_font_montserrat_30, 0);
|
|
||||||
lv_obj_center(button_label);
|
lv_obj_center(button_label);
|
||||||
|
|
||||||
touch_count_label = lv_label_create(card);
|
touch_count_label = lv_label_create(card);
|
||||||
lv_label_set_text(touch_count_label, "Touch test count: 0");
|
lv_label_set_text(touch_count_label, "Touch test count: 0");
|
||||||
lv_obj_set_style_text_color(touch_count_label, lv_color_hex(0xB8C0C8), 0);
|
lv_obj_set_style_text_color(touch_count_label, lv_color_hex(0xB8C0C8), 0);
|
||||||
lv_obj_set_style_text_font(touch_count_label, &lv_font_montserrat_30, 0);
|
|
||||||
lv_obj_align(touch_count_label, LV_ALIGN_BOTTOM_LEFT, 300, -22);
|
lv_obj_align(touch_count_label, LV_ALIGN_BOTTOM_LEFT, 300, -22);
|
||||||
|
|
||||||
lv_obj_t *footer = lv_label_create(screen);
|
lv_obj_t *footer = lv_label_create(screen);
|
||||||
lv_label_set_text(footer, "Next: WiFi client -> GET /api/v1/status from Cargo ESP");
|
lv_label_set_text(footer, "Next: WiFi client -> GET /api/v1/status from Cargo ESP");
|
||||||
lv_obj_set_style_text_color(footer, lv_color_hex(0x7D8996), 0);
|
lv_obj_set_style_text_color(footer, lv_color_hex(0x7D8996), 0);
|
||||||
lv_obj_set_style_text_font(footer, &lv_font_montserrat_30, 0);
|
lv_obj_set_width(footer, 900);
|
||||||
|
lv_obj_set_style_text_align(footer, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
lv_obj_align(footer, LV_ALIGN_BOTTOM_MID, 0, -28);
|
lv_obj_align(footer, LV_ALIGN_BOTTOM_MID, 0, -28);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user