fix(meter) keep the creation order of indicator during drawing

Instead of drawing the indicators per scale
This commit is contained in:
Gabor Kiss-Vamosi
2021-04-29 10:11:21 +02:00
parent 1b93668df7
commit 9ff1cb7f1d
5 changed files with 89 additions and 109 deletions

View File

@@ -7,12 +7,14 @@
void lv_example_meter_4(void)
{
lv_obj_t * meter = lv_meter_create(lv_scr_act());
lv_obj_center(meter);
/*Remove the background and the circle from the middle*/
lv_obj_remove_style(meter, NULL, LV_PART_MAIN);
lv_obj_remove_style(meter, NULL, LV_PART_INDICATOR);
lv_obj_set_size(meter, 200, 200);
lv_obj_center(meter);
/*Add a scale first with no ticks.*/
lv_meter_scale_t * scale = lv_meter_add_scale(meter);
lv_meter_set_scale_ticks(meter, scale, 0, 0, 0, lv_color_black());