Transparent lv_spinner

Hi,

I’m trying to get the background of a lv_spinner to be transparent. I’m creating it like this:
lv_obj_t * busyIndicator = lv_spinner_create(mainPanel, NULL);
lv_obj_set_size(busyIndicator, 50, 50);
lv_obj_align(busyIndicator, NULL, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_local_line_width(busyIndicator, LV_SPINNER_PART_INDIC, LV_STATE_DEFAULT, 5);

Resulting in:
busy

using
v_obj_set_style_local_bg_opa(busyIndicator, LV_SPINNER_PART_BG, LV_STATE_DEFAULT, 50);
results in:
busy2

Regards
Pierre

Have you tried a bg_opa of 0? An opacity of 0 = transparent.

lv_obj_set_style_local_bg_opa(busyIndicator, LV_SPINNER_PART_BG, LV_STATE_DEFAULT, 0);

Yes I have, it has no effect, result is same as first picture above. Just to re-iterate, I’m trying to get the black circular background transparent.

Ok, so the trick is to set the background line width the same as the indicator width:

lv_obj_set_style_local_line_width(busyIndicator, LV_SPINNER_PART_BG, LV_STATE_DEFAULT, 5);

So we learn!