Hello, everyone
I have a button with a text label. Styles are used for her states.
style_release.body.radius = 8;
style_release.body.border.width = 3;
style_release.body.border.opa = LV_OPA_100;
style_release.text.font = &roboto_24_regular;
style_release.image.intense = LV_OPA_100;
style_release.body.main_color = UI_COLOR_ACCENT;
style_release.body.grad_color = UI_COLOR_ACCENT;
style_release.body.border.color = UI_COLOR_ACCENT;
style_release.text.color = style_release.image.color = UI_COLOR_WHITE;
lv_style_copy(&style_pressed, &style_release);
style_pressed.body.main_color = UI_COLOR_ACCENT_PRESSED;
style_pressed.body.grad_color = UI_COLOR_ACCENT_PRESSED;
style_pressed.body.border.color = UI_COLOR_ACCENT_PRESSED;
style_pressed.text.color = style_pressed.image.color = UI_COLOR_WHITE;
lv_style_copy(&style_disabled, &style_release);
style_disabled.body.main_color = UI_COLOR_BASIC_GREY;
style_disabled.body.grad_color = UI_COLOR_BASIC_GREY;
style_disabled.body.border.color = UI_COLOR_BASIC_GREY;
style_disabled.text.color = style_disabled.image.color = UI_COLOR_DISABLED_GREY;
lv_obj_set_size(btn, SHORT_BUTTON_W, SHORT_BUTTON_H);
lv_btn_set_style(btn, LV_BTN_STATE_REL, &style_release);
lv_btn_set_style(btn, LV_BTN_STATE_PR, &style_pressed);
lv_btn_set_style(btn, LV_BTN_STATE_INA, &style_disabled);
lv_obj_set_size(label, SHORT_BUTTON_LABEL_W, SHORT_BUTTON_LABEL_H);
She looks like this
I need to add an icon so that it also looks like a label
It is necessary that the color of the image changes as well as the color of the text.
How to do it?