Skip to content

Commit

Permalink
fix(dropdown) fix list position with RTL base direction
Browse files Browse the repository at this point in the history
related to #2424
  • Loading branch information
kisvegabor committed Aug 2, 2021
1 parent 531afcc commit 79edb37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/lv_dropdown.c
Original file line number Diff line number Diff line change
@@ -501,13 +501,13 @@ void lv_dropdown_open(lv_obj_t * dropdown_obj)
switch(align) {
default:
case LV_TEXT_ALIGN_LEFT:
lv_obj_set_x(label, 0);
lv_obj_align(label, LV_ALIGN_TOP_LEFT, 0, 0);
break;
case LV_TEXT_ALIGN_RIGHT:
lv_obj_set_x(label, lv_obj_get_content_width(dropdown->list) - lv_obj_get_width(label));
lv_obj_align(label, LV_ALIGN_TOP_RIGHT, 0, 0);
break;
case LV_TEXT_ALIGN_CENTER:
lv_obj_set_x(label, lv_obj_get_content_width(dropdown->list) / 2 - lv_obj_get_width(label) / 2);
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
break;

}

0 comments on commit 79edb37

Please sign in to comment.