mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(meter): fix events and draw_part_dsc-s
fixes https://forum.lvgl.io/t/event-sent-wrong-in-lv-meter-c/10834/2
This commit is contained in:
parent
b9b55a9eed
commit
27400cd9ad
@ -328,7 +328,7 @@ static void draw_arcs(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area_t
|
||||
lv_obj_draw_part_dsc_t part_draw_dsc;
|
||||
lv_obj_draw_dsc_init(&part_draw_dsc, draw_ctx);
|
||||
part_draw_dsc.arc_dsc = &arc_dsc;
|
||||
part_draw_dsc.part = LV_PART_INDICATOR;
|
||||
part_draw_dsc.part = LV_PART_ITEMS;
|
||||
part_draw_dsc.class_p = MY_CLASS;
|
||||
part_draw_dsc.type = LV_METER_DRAW_PART_ARC;
|
||||
|
||||
@ -514,7 +514,7 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
|
||||
inner_act_mask_id = lv_draw_mask_add(major ? &inner_major_mask : &inner_minor_mask, NULL);
|
||||
lv_draw_line(draw_ctx, &line_dsc, &p_outer, &p_center);
|
||||
lv_draw_mask_remove_id(inner_act_mask_id);
|
||||
lv_event_send(obj, LV_EVENT_DRAW_MAIN_END, &part_draw_dsc);
|
||||
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
|
||||
|
||||
line_dsc.color = line_color_ori;
|
||||
line_dsc.width = line_width_ori;
|
||||
@ -549,6 +549,7 @@ static void draw_needles(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area
|
||||
lv_obj_draw_dsc_init(&part_draw_dsc, draw_ctx);
|
||||
part_draw_dsc.class_p = MY_CLASS;
|
||||
part_draw_dsc.p1 = &scale_center;
|
||||
part_draw_dsc.part = LV_PART_ITEMS;
|
||||
|
||||
lv_meter_indicator_t * indic;
|
||||
_LV_LL_READ_BACK(&meter->indicator_ll, indic) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user