Update lv_label.c
This commit is contained in:
@@ -1302,10 +1302,18 @@ static void lv_label_refr_text(lv_obj_t * label)
|
||||
p.y -= style->text.line_space; /*Trim the last line space*/
|
||||
uint32_t letter_id = lv_label_get_letter_on(label, &p);
|
||||
|
||||
/*Save letters under the dots and replace them with dots*/
|
||||
uint32_t i;
|
||||
|
||||
/*Be sure there is space for the dots*/
|
||||
size_t txt_len = strlen(ext->text);
|
||||
uint32_t byte_id = lv_txt_encoded_get_byte_id(ext->text, letter_id);
|
||||
while(byte_id + LV_LABEL_DOT_NUM > txt_len) {
|
||||
byte_id -= lv_txt_encoded_size(&ext->text[byte_id]);
|
||||
letter_id--;
|
||||
}
|
||||
|
||||
/*Save letters under the dots and replace them with dots*/
|
||||
uint32_t byte_id_ori = byte_id;
|
||||
uint32_t i;
|
||||
uint8_t len = 0;
|
||||
for(i = 0; i <= LV_LABEL_DOT_NUM; i++) {
|
||||
len += lv_txt_encoded_size(&ext->text[byte_id]);
|
||||
|
||||
Reference in New Issue
Block a user