mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
label: fix lv_label_get_letter_on if BIDI enabled
This commit is contained in:
parent
6adcdda06a
commit
28f4092247
@ -775,11 +775,16 @@ uint32_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos)
|
|||||||
|
|
||||||
#if LV_USE_BIDI
|
#if LV_USE_BIDI
|
||||||
/*Handle Bidi*/
|
/*Handle Bidi*/
|
||||||
bool is_rtl;
|
uint32_t cid = _lv_txt_encoded_get_char_id(bidi_txt, i);
|
||||||
logical_pos = _lv_bidi_get_logical_pos(&txt[line_start], NULL, txt_len, lv_obj_get_base_dir(label),
|
if(txt[line_start + cid] == '\0') {
|
||||||
_lv_txt_encoded_get_char_id(bidi_txt, i), &is_rtl);
|
logical_pos = i;
|
||||||
if(is_rtl) logical_pos++;
|
} else {
|
||||||
_lv_mem_buf_release(bidi_txt);
|
bool is_rtl;
|
||||||
|
logical_pos = _lv_bidi_get_logical_pos(&txt[line_start], NULL,
|
||||||
|
txt_len, lv_obj_get_base_dir(label), cid, &is_rtl);
|
||||||
|
if(is_rtl) logical_pos++;
|
||||||
|
_lv_mem_buf_release(bidi_txt);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
logical_pos = _lv_txt_encoded_get_char_id(bidi_txt, i);
|
logical_pos = _lv_txt_encoded_get_char_id(bidi_txt, i);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user