Not able to change object's background


What MCU/Processor/Board and compiler are you using?

I’m using SDL simulator.

What do you experience?

Changing background color of plain object doesn’t work, while changing (for example) border color and border width of the same object or changing background color of screen work.

What do you expect?

Background color changing to gray.

Code to reproduce

// Create style                                                            
static lv_style_t style_obj;                                
lv_style_set_border_color(&style_obj, LV_STATE_DEFAULT, LV_COLOR_GRAY);                                                                               
lv_style_set_border_width(&style_obj, LV_STATE_DEFAULT, 10);               
// Create an object                                                        
lv_obj_t *obj = lv_obj_create(lv_scr_act(), NULL);                         
lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style_obj);                       
lv_obj_set_size(obj, 100, 100);                                            
lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);

Screenshot and/or video

Solved, turns out lv_style_set_bg_opa(); was required too.