|
@@ -39,7 +39,7 @@ typedef struct
|
|
|
static ota_ui_data_t *s_ota_ui_data = NULL;
|
|
|
static void ota_ui_create(void);
|
|
|
|
|
|
-LV_FONT_DECLARE(ota_font)
|
|
|
+LV_FONT_DECLARE(lv_ota_font_26)
|
|
|
|
|
|
static int32_t keypad_evt_handler(aem_key_evt_info_t *evt_info)
|
|
|
{
|
|
@@ -102,7 +102,7 @@ static void create_ui(ota_ui_data_t *ui_data)
|
|
|
lv_obj_t *label = text_canvas_create(bg);
|
|
|
if (label != NULL)
|
|
|
{
|
|
|
- lv_obj_set_style_text_font(label, &ota_font, 0);
|
|
|
+ lv_obj_set_style_text_font(label, &lv_ota_font_26, 0);
|
|
|
lv_obj_set_style_text_color(label, lv_color_white(), 0);
|
|
|
lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0);
|
|
|
lv_obj_set_width(label, TEXT_WIDTH);
|
|
@@ -112,19 +112,19 @@ static void create_ui(ota_ui_data_t *ui_data)
|
|
|
lv_obj_t *bar = lv_bar_create(bg);
|
|
|
if (bar != NULL)
|
|
|
{
|
|
|
- lv_obj_set_size(bar, AEM_SIZE_HOR_FACTOR_466(300), AEM_SIZE_VER_FACTOR_466(20));
|
|
|
- lv_obj_set_style_bg_color(bar, lv_color_hex(0xFFFFFF), LV_PART_MAIN);
|
|
|
+ lv_obj_set_size(bar, AEM_SIZE_HOR_FACTOR_466(300), AEM_SIZE_VER_FACTOR_466(8));
|
|
|
+ lv_obj_set_style_bg_color(bar, lv_color_hex(0x191919), LV_PART_MAIN);
|
|
|
lv_obj_set_style_bg_opa(bar, LV_OPA_COVER, LV_PART_INDICATOR);
|
|
|
- lv_obj_set_style_bg_opa(bar, LV_OPA_10, LV_PART_MAIN);
|
|
|
- lv_obj_set_style_bg_color(bar, lv_color_hex(0x338FFF), LV_PART_INDICATOR);
|
|
|
- lv_obj_set_style_radius(bar, 10, LV_PART_MAIN);
|
|
|
+ lv_obj_set_style_bg_opa(bar, LV_OPA_COVER, LV_PART_MAIN);
|
|
|
+ lv_obj_set_style_bg_color(bar, lv_color_hex(0xFFFFFF), LV_PART_INDICATOR);
|
|
|
+ // lv_obj_set_style_radius(bar, 10, LV_PART_MAIN);
|
|
|
}
|
|
|
ui_data->progress_bar = bar;
|
|
|
|
|
|
lv_obj_t *result_label = text_canvas_create(bg);
|
|
|
if (result_label != NULL)
|
|
|
{
|
|
|
- lv_obj_set_style_text_font(result_label, &ota_font, 0);
|
|
|
+ lv_obj_set_style_text_font(result_label, &lv_ota_font_26, 0);
|
|
|
lv_obj_set_style_text_color(result_label, lv_color_white(), 0);
|
|
|
lv_obj_set_width(result_label, TEXT_WIDTH);
|
|
|
lv_obj_set_style_text_align(result_label, LV_TEXT_ALIGN_CENTER, 0);
|
|
@@ -166,7 +166,7 @@ static void ota_update_ui(aem_ota_info_t *info, ota_ui_data_t *ui_data)
|
|
|
text_canvas_set_text_fmt(ui_data->download_label, "Download %d%%...", info->progress);
|
|
|
lv_obj_align(ui_data->download_label, LV_ALIGN_TOP_MID, 0, AEM_SIZE_VER_FACTOR_466(180));
|
|
|
lv_bar_set_value(ui_data->progress_bar, info->progress, false);
|
|
|
- lv_obj_align(ui_data->progress_bar, LV_ALIGN_BOTTOM_MID, 0, AEM_SIZE_VER_FACTOR_466(-140));
|
|
|
+ lv_obj_align(ui_data->progress_bar, LV_ALIGN_BOTTOM_MID, 0, AEM_SIZE_VER_FACTOR_466(-200));
|
|
|
}
|
|
|
}
|
|
|
else if (info->type == POP_OTA_FAILED)
|