From 4d61f3802013b31b0af5f08f66bb86f5179db141 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 22 Dec 2021 17:55:47 +0100 Subject: [PATCH] fix(label): dot not add dots if the label height > 1 font line height fixes: #2907 --- src/widgets/lv_label.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/lv_label.c b/src/widgets/lv_label.c index 675964893..012bf857c 100644 --- a/src/widgets/lv_label.c +++ b/src/widgets/lv_label.c @@ -1093,6 +1093,9 @@ static void lv_label_refr_text(lv_obj_t * obj) if(size.y <= lv_area_get_height(&txt_coords)) { /*No dots are required, the text is short enough*/ label->dot_end = LV_LABEL_DOT_END_INV; } + else if(size.y <= lv_font_get_line_height(font)) { /*No dots are required for one-line texts*/ + label->dot_end = LV_LABEL_DOT_END_INV; + } else if(_lv_txt_get_encoded_length(label->text) <= LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/ label->dot_end = LV_LABEL_DOT_END_INV; }