mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
nyx: Allow hue icons from section names
This commit is contained in:
parent
c7ab404fc1
commit
f56d1bad04
2 changed files with 13 additions and 10 deletions
|
@ -1293,7 +1293,7 @@ static lv_res_t _win_launch_close_action(lv_obj_t * btn)
|
|||
lv_img_dsc_t *src = (lv_img_dsc_t *)lv_img_get_src(img);
|
||||
|
||||
// Avoid freeing base icons.
|
||||
if ((src != icon_switch) && (src != icon_payload) && (src != icon_lakka))
|
||||
if ((src != icon_switch) && (src != icon_payload))
|
||||
free(src);
|
||||
}
|
||||
}
|
||||
|
@ -1576,15 +1576,18 @@ ini_parsing:
|
|||
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||
if (!bmp)
|
||||
{
|
||||
if (!strcmp(ini_sec->name, "Lakka"))
|
||||
bmp = icon_lakka;
|
||||
else if (payload)
|
||||
{
|
||||
bmp = icon_payload;
|
||||
s_printf(tmp_path, "bootloader/res/%s_hue.bmp", ini_sec->name);
|
||||
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||
if (bmp)
|
||||
img_colorize = true;
|
||||
}
|
||||
|
||||
if (!icon_pl_custom)
|
||||
img_colorize = true;
|
||||
}
|
||||
if (!bmp && payload)
|
||||
{
|
||||
bmp = icon_payload;
|
||||
|
||||
if (!icon_pl_custom)
|
||||
img_colorize = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -373,7 +373,7 @@ void nyx_init_load_res()
|
|||
else
|
||||
icon_payload = bmp_to_lvimg_obj("bootloader/res/icon_payload_custom.bmp");
|
||||
|
||||
icon_lakka = bmp_to_lvimg_obj("bootloader/res/icon_lakka.bmp");
|
||||
// Load background resource if any.
|
||||
hekate_bg = bmp_to_lvimg_obj("bootloader/res/background.bmp");
|
||||
|
||||
sd_unmount(false);
|
||||
|
|
Loading…
Reference in a new issue