mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 11:42:09 +00:00
nyx: add nobox and hue combo for launch
`_hue_nobox` is now supported which colorizes the icon and also removes the border.
This commit is contained in:
parent
1582ef3a29
commit
0ba9b49074
1 changed files with 32 additions and 10 deletions
|
@ -1767,16 +1767,29 @@ ini_parsing:
|
||||||
s_printf(tmp_path, "bootloader/res/%s.bmp", ini_sec->name);
|
s_printf(tmp_path, "bootloader/res/%s.bmp", ini_sec->name);
|
||||||
bmp = bmp_to_lvimg_obj(tmp_path);
|
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||||
if (!bmp)
|
if (!bmp)
|
||||||
|
{
|
||||||
|
s_printf(tmp_path, "bootloader/res/%s_hue_nobox.bmp", ini_sec->name);
|
||||||
|
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||||
|
if (bmp)
|
||||||
|
{
|
||||||
|
img_noborder = true;
|
||||||
|
img_colorize = true;
|
||||||
|
}
|
||||||
|
if (!bmp)
|
||||||
{
|
{
|
||||||
s_printf(tmp_path, "bootloader/res/%s_hue.bmp", ini_sec->name);
|
s_printf(tmp_path, "bootloader/res/%s_hue.bmp", ini_sec->name);
|
||||||
bmp = bmp_to_lvimg_obj(tmp_path);
|
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||||
if (bmp)
|
if (bmp)
|
||||||
img_colorize = true;
|
img_colorize = true;
|
||||||
|
}
|
||||||
|
if (!bmp)
|
||||||
|
{
|
||||||
s_printf(tmp_path, "bootloader/res/%s_nobox.bmp", ini_sec->name);
|
s_printf(tmp_path, "bootloader/res/%s_nobox.bmp", ini_sec->name);
|
||||||
bmp = bmp_to_lvimg_obj(tmp_path);
|
bmp = bmp_to_lvimg_obj(tmp_path);
|
||||||
if (bmp)
|
if (bmp)
|
||||||
img_noborder = true;
|
img_noborder = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!bmp && payload)
|
if (!bmp && payload)
|
||||||
{
|
{
|
||||||
|
@ -1790,14 +1803,23 @@ ini_parsing:
|
||||||
{
|
{
|
||||||
bmp = bmp_to_lvimg_obj(icon_path);
|
bmp = bmp_to_lvimg_obj(icon_path);
|
||||||
|
|
||||||
|
// Check if both colorization and border are enabled.
|
||||||
|
if (bmp && strlen(icon_path) > 14 && !memcmp(icon_path + strlen(icon_path) - 14, "_hue_nobox", 10))
|
||||||
|
{
|
||||||
|
img_colorize = true;
|
||||||
|
img_noborder = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Check if colorization is enabled.
|
// Check if colorization is enabled.
|
||||||
if (bmp && strlen(icon_path) > 8 && !memcmp(icon_path + strlen(icon_path) - 8, "_hue", 4))
|
if (bmp && strlen(icon_path) > 8 && !memcmp(icon_path + strlen(icon_path) - 8, "_hue", 4))
|
||||||
img_colorize = true;
|
img_colorize = true;
|
||||||
|
|
||||||
// Check if no border is enabled.
|
// Check if no border is enabled.
|
||||||
if (bmp && strlen(icon_path) > 8 && !memcmp(icon_path + strlen(icon_path) - 10, "_nobox", 4))
|
if (bmp && strlen(icon_path) > 10 && !memcmp(icon_path + strlen(icon_path) - 10, "_nobox", 6))
|
||||||
img_noborder = true;
|
img_noborder = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Enable button.
|
// Enable button.
|
||||||
lv_obj_set_opa_scale(launch_ctxt.btn[curr_btn_idx], LV_OPA_COVER);
|
lv_obj_set_opa_scale(launch_ctxt.btn[curr_btn_idx], LV_OPA_COVER);
|
||||||
|
|
Loading…
Reference in a new issue