mirror of
https://github.com/CTCaer/hekate
synced 2024-11-16 00:49:27 +00:00
nyx: Use a static color for verifying bar indicator
This commit is contained in:
parent
de4891e133
commit
63be93be64
3 changed files with 8 additions and 2 deletions
|
@ -186,7 +186,7 @@ static int _dump_emmc_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage, u32
|
|||
u32 pct = (u64)((u64)(lba_curr - part->lba_start) * 100u) / (u64)(part->lba_end - part->lba_start);
|
||||
lv_bar_set_value(gui->bar, pct);
|
||||
lv_bar_set_style(gui->bar, LV_BAR_STYLE_BG, gui->bar_teal_bg);
|
||||
lv_bar_set_style(gui->bar, LV_BAR_STYLE_INDIC, lv_theme_get_current()->bar.indic);
|
||||
lv_bar_set_style(gui->bar, LV_BAR_STYLE_INDIC, gui->bar_teal_ind);
|
||||
s_printf(gui->txt_buf, " "SYMBOL_DOT" %d%%", pct);
|
||||
lv_label_set_text(gui->label_pct, gui->txt_buf);
|
||||
manual_system_maintenance(true);
|
||||
|
|
|
@ -27,6 +27,7 @@ typedef struct _emmc_tool_gui_t
|
|||
lv_obj_t *label_finish;
|
||||
lv_obj_t *bar;
|
||||
lv_style_t *bar_teal_bg;
|
||||
lv_style_t *bar_teal_ind;
|
||||
lv_style_t *bar_white_ind;
|
||||
char *txt_buf;
|
||||
char *base_path;
|
||||
|
|
|
@ -108,17 +108,22 @@ static void _create_window_backup_restore(emmcPartType_t type, const char* win_l
|
|||
lv_obj_align(label_info, label_sep, LV_ALIGN_OUT_BOTTOM_LEFT, LV_DPI / 4, LV_DPI / 10);
|
||||
emmc_tool_gui_ctxt.label_info = label_info;
|
||||
|
||||
static lv_style_t bar_teal_bg, bar_white_ind;
|
||||
static lv_style_t bar_teal_bg, bar_teal_ind, bar_white_ind;
|
||||
|
||||
lv_style_copy(&bar_teal_bg, lv_theme_get_current()->bar.bg);
|
||||
bar_teal_bg.body.main_color = LV_COLOR_HEX(0x005a47);
|
||||
bar_teal_bg.body.grad_color = bar_teal_bg.body.main_color;
|
||||
|
||||
lv_style_copy(&bar_teal_ind, lv_theme_get_current()->bar.indic);
|
||||
bar_teal_ind.body.main_color = LV_COLOR_HEX(0x00FFC9);
|
||||
bar_teal_ind.body.grad_color = bar_teal_ind.body.main_color;
|
||||
|
||||
lv_style_copy(&bar_white_ind, lv_theme_get_current()->bar.indic);
|
||||
bar_white_ind.body.main_color = LV_COLOR_HEX(0xF0F0F0);
|
||||
bar_white_ind.body.grad_color = bar_white_ind.body.main_color;
|
||||
|
||||
emmc_tool_gui_ctxt.bar_teal_bg = &bar_teal_bg;
|
||||
emmc_tool_gui_ctxt.bar_teal_ind = &bar_teal_ind;
|
||||
emmc_tool_gui_ctxt.bar_white_ind = &bar_white_ind;
|
||||
|
||||
lv_obj_t *bar = lv_bar_create(h1, NULL);
|
||||
|
|
Loading…
Reference in a new issue