How to set opacity of meter arc?

I did not find any ready made function that was able to change arc’s opacity, however I managed to do it through drawing events.

void ui_event_meter_cb(lv_event_t * e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_draw_part_dsc_t *dsc = (lv_obj_draw_part_dsc_t *)lv_event_get_param(e);
	
	if (code == LV_EVENT_DRAW_PART_BEGIN && dsc->type == LV_METER_DRAW_PART_ARC) {
		dsc->arc_dsc->opa = 180;
    }
}
1 Like