mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
fix(label):make draw area contain ext_draw_size (#2587)
This commit is contained in:
parent
6c868a4b35
commit
a3952fcd0a
@ -849,7 +849,7 @@ static void draw_main(lv_event_t * e)
|
|||||||
txt_coords.y2 = obj->coords.y2;
|
txt_coords.y2 = obj->coords.y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint);
|
lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint);
|
||||||
|
|
||||||
if(label->long_mode == LV_LABEL_LONG_SCROLL_CIRCULAR) {
|
if(label->long_mode == LV_LABEL_LONG_SCROLL_CIRCULAR) {
|
||||||
lv_point_t size;
|
lv_point_t size;
|
||||||
@ -862,7 +862,7 @@ static void draw_main(lv_event_t * e)
|
|||||||
lv_font_get_glyph_width(label_draw_dsc.font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
|
lv_font_get_glyph_width(label_draw_dsc.font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
|
||||||
label_draw_dsc.ofs_y = label->offset.y;
|
label_draw_dsc.ofs_y = label->offset.y;
|
||||||
|
|
||||||
lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint);
|
lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Draw the text again below the original to make a circular effect */
|
/*Draw the text again below the original to make a circular effect */
|
||||||
@ -870,7 +870,7 @@ static void draw_main(lv_event_t * e)
|
|||||||
label_draw_dsc.ofs_x = label->offset.x;
|
label_draw_dsc.ofs_x = label->offset.x;
|
||||||
label_draw_dsc.ofs_y = label->offset.y + size.y + lv_font_get_line_height(label_draw_dsc.font);
|
label_draw_dsc.ofs_y = label->offset.y + size.y + lv_font_get_line_height(label_draw_dsc.font);
|
||||||
|
|
||||||
lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint);
|
lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user