mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Ensure lv_ta_set_one_line doesn't change text alignment
This commit is contained in:
parent
84ed542b34
commit
f960c75e3f
@ -733,6 +733,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en)
|
||||
|
||||
lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
|
||||
if(ext->one_line == en) return;
|
||||
lv_label_align_t old_align = lv_ta_get_text_align(ta);
|
||||
|
||||
if(en) {
|
||||
const lv_style_t * style_ta = lv_obj_get_style(ta);
|
||||
@ -760,7 +761,8 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en)
|
||||
}
|
||||
|
||||
placeholder_update(ta);
|
||||
refr_cursor_area(ta);
|
||||
/* `refr_cursor_area` is called at the end of lv_ta_set_text_align */
|
||||
lv_ta_set_text_align(ta, old_align);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user