Add support for launch icons changing color with theme.

This commit is contained in:
Nichole Mattera 2020-05-02 16:04:29 -04:00
parent da8c040c08
commit 0ce973966f
7 changed files with 9 additions and 0 deletions

View file

@ -1585,6 +1585,15 @@ ini_parsing:
if (bmp) if (bmp)
{ {
img = lv_img_create(launch_ctxt[curr_btn_idx], NULL); img = lv_img_create(launch_ctxt[curr_btn_idx], NULL);
if (icon_path && !memcmp(icon_path + strlen(icon_path) - 13, "_colorize", 9)) {
static lv_style_t style;
lv_style_copy(&style, &lv_style_plain);
style.image.color = lv_color_hsv_to_rgb(n_cfg.themecolor, 100, 100);
style.image.intense = LV_OPA_COVER;
lv_img_set_style(img, &style);
}
lv_img_set_src(img, bmp); lv_img_set_src(img, bmp);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB