feat(textarea) remove the need of lv_textarea_set_align

It was used to position the text in one line text areas where the label is shorter then the text area itself.
However, setting min_width=100% in case of one line text area ensures that the label is at least as wide as
the text area. This way the normal text_align style property can be used too.

Fixes https://forum.lvgl.io/t/spinbox-text-centering-not-working-as-intended-expected/6762/4
This commit is contained in:
Gabor Kiss-Vamosi
2021-09-13 20:09:09 +02:00
parent 26e15fa577
commit 56ebb1a4c8
3 changed files with 4 additions and 5 deletions

View File

@@ -74,11 +74,6 @@ In password mode `lv_textarea_get_text(textarea)` returns the actual text entere
The visibility time can be adjusted with `LV_TEXTAREA_DEF_PWD_SHOW_TIME)` in `lv_conf.h`.
### Text alignment
To align the text in the Text area ` lv_textarea_set_align(textarea, LV_TEXT_ALIGN_LEFT/RIGHT/CENTER)` needs to be used instead of setting the `text_align` style property.
### Accepted characters
You can set a list of accepted characters with `lv_textarea_set_accepted_chars(textarea, "0123456789.+-")`.
Other characters will be ignored.