mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(arabic): support Arabic letter connections in value string property
This commit is contained in:
parent
d90cbe92de
commit
07a95b5b33
@ -12,6 +12,8 @@
|
||||
- fix(indev) disabled object shouldn't absorb clicks but let the parent to be clicked
|
||||
- fix(arabic) support processing again already processed texts with _lv_txt_ap_proc
|
||||
- fix(textarea) support Arabic letter connections
|
||||
- fix(dropdown) support Arabic letter connections
|
||||
- fix(value_str) support Arabic letter connections in value string property
|
||||
|
||||
## v7.7.2 (Planned to 17.11.2020)
|
||||
### Bugfixes
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "lv_draw_blend.h"
|
||||
#include "lv_draw_mask.h"
|
||||
#include "../lv_misc/lv_math.h"
|
||||
#include "../lv_misc/lv_txt_ap.h"
|
||||
#include "../lv_core/lv_refr.h"
|
||||
#include "../lv_misc/lv_debug.h"
|
||||
|
||||
@ -1295,8 +1296,16 @@ static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, con
|
||||
if(dsc->value_str == NULL) return;
|
||||
if(dsc->value_opa <= LV_OPA_MIN) return;
|
||||
|
||||
#if LV_USE_ARABIC_PERSIAN_CHARS == 0
|
||||
const char * str = dsc->value_str;
|
||||
#else
|
||||
uint32_t str_len = _lv_txt_ap_calc_bytes_cnt(dsc->value_str);
|
||||
char * str = _lv_mem_buf_get(str_len + 1);
|
||||
_lv_txt_ap_proc(dsc->value_str, str);
|
||||
#endif
|
||||
|
||||
lv_point_t s;
|
||||
_lv_txt_get_size(&s, dsc->value_str, dsc->value_font, dsc->value_letter_space, dsc->value_line_space, LV_COORD_MAX,
|
||||
_lv_txt_get_size(&s, str, dsc->value_font, dsc->value_letter_space, dsc->value_line_space, LV_COORD_MAX,
|
||||
LV_TXT_FLAG_NONE);
|
||||
|
||||
lv_area_t value_area;
|
||||
@ -1321,7 +1330,7 @@ static void draw_value_str(const lv_area_t * coords, const lv_area_t * clip, con
|
||||
label_dsc.color = dsc->value_color;
|
||||
label_dsc.opa = dsc->value_opa;
|
||||
|
||||
lv_draw_label(&value_area, clip, &label_dsc, dsc->value_str, NULL);
|
||||
lv_draw_label(&value_area, clip, &label_dsc, str, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user