1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(label):make draw area contain ext_draw_size (#2587)

This commit is contained in:
guoweilkd 2021-09-23 22:54:57 +08:00 committed by GitHub
parent 6c868a4b35
commit a3952fcd0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -849,7 +849,7 @@ static void draw_main(lv_event_t * e)
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) {
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;
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 */
@ -870,7 +870,7 @@ static void draw_main(lv_event_t * e)
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);
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);
}
}
}