mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
fix(bidi) fix tabview, textarea, label, btnmatrix, roller, dropdown with RTL base direction
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
void lv_example_tabview_1(void)
|
||||
{
|
||||
lv_obj_set_style_base_dir(lv_scr_act(), LV_BASE_DIR_RTL, 0);
|
||||
/*Create a Tab view object*/
|
||||
lv_obj_t *tabview;
|
||||
tabview = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 50);
|
||||
@@ -36,7 +37,7 @@ void lv_example_tabview_1(void)
|
||||
label = lv_label_create(tab3);
|
||||
lv_label_set_text(label, "Third tab");
|
||||
|
||||
lv_obj_scroll_to_view_recursive(label, LV_ANIM_ON);
|
||||
// lv_obj_scroll_to_view_recursive(label, LV_ANIM_ON);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,10 @@ static void btnm_event_handler(lv_event_t * e)
|
||||
|
||||
void lv_example_textarea_1(void)
|
||||
{
|
||||
// lv_obj_set_style_base_dir(lv_scr_act(), LV_BASE_DIR_RTL, 0);
|
||||
lv_obj_t * ta = lv_textarea_create(lv_scr_act());
|
||||
lv_textarea_set_one_line(ta, true);
|
||||
// lv_textarea_set_one_line(ta, true);
|
||||
lv_textarea_set_text(ta, "Hey");
|
||||
lv_obj_align(ta, LV_ALIGN_TOP_MID, 0, 10);
|
||||
lv_obj_add_event_cb(ta, textarea_event_handler, LV_EVENT_READY, ta);
|
||||
lv_obj_add_state(ta, LV_STATE_FOCUSED); /*To be sure the cursor is visible*/
|
||||
|
||||
@@ -7,6 +7,7 @@ static lv_obj_t * kb;
|
||||
|
||||
void lv_example_textarea_2(void)
|
||||
{
|
||||
lv_obj_set_style_base_dir(lv_scr_act(), LV_BASE_DIR_RTL, 0);
|
||||
/*Create the password box*/
|
||||
lv_obj_t * pwd_ta = lv_textarea_create(lv_scr_act());
|
||||
lv_textarea_set_text(pwd_ta, "");
|
||||
|
||||
Reference in New Issue
Block a user