Description
What MCU/Processor/Board and compiler are you using?
esp32
What LVGL version are you using?
LVGL V8.0
What do you want to achieve?
I want to change lvgl default check box color.
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
elgerg
February 17, 2022, 8:13pm
2
Did you manage to figure this out?
I also want to change the colour…
jr_ol
February 18, 2022, 12:39am
3
I think you can try to use the lv_theme_default_init() function.
But also I would like to know how the hook in the checkbox is implemented. How to set LV_SYMBOL_OK.
elgerg
February 18, 2022, 6:15pm
4
I have finally figured it out…
lv_obj_set_style_border_color(cbox_tempenabled, lv_color_hex(MAIN_SWITCH_COLOUR), LV_PART_INDICATOR | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(cbox_tempenabled, lv_color_hex(MAIN_SWITCH_COLOUR), LV_PART_INDICATOR | LV_STATE_CHECKED);
lv_obj_set_style_bg_color(cbox_tempenabled, lv_color_hex(MAIN_SWITCH_COLOUR), LV_PART_INDICATOR | LV_STATE_CHECKED);
Hope this helps someone else