label hint updates
This commit is contained in:
@@ -88,7 +88,10 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
uint32_t line_start = 0;
|
||||
int32_t last_line_start = -1;
|
||||
if(hint) {
|
||||
if(hint->coord_y == coords->y1) last_line_start = hint->line_start;
|
||||
if(LV_MATH_ABS(hint->coord_y - coords->y1) > 800) {
|
||||
hint->line_start = -1;
|
||||
last_line_start = hint->line_start;
|
||||
}
|
||||
}
|
||||
if(last_line_start >= 0) {
|
||||
line_start = last_line_start;
|
||||
@@ -105,7 +108,8 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
|
||||
pos.y += line_height;
|
||||
|
||||
if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) {
|
||||
// if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) {
|
||||
if(pos.y >= -1000 && hint->line_start < 0) {
|
||||
hint->line_start = line_start;
|
||||
hint->y = pos.y;
|
||||
hint->coord_y = coords->y1;
|
||||
|
||||
Reference in New Issue
Block a user