merge dev

This commit is contained in:
Gabor Kiss-Vamosi
2020-09-30 21:30:07 +02:00
27 changed files with 1122 additions and 95 deletions

View File

@@ -621,6 +621,10 @@ void lv_dropdown_open(lv_obj_t * ddlist)
lv_obj_set_y(ext->list, lv_obj_get_y(ext->list) - (ext->list->coords.y2 - LV_VER_RES));
}
}
if(lv_label_get_align(label) == LV_LABEL_ALIGN_RIGHT) {
lv_obj_set_x(label, lv_obj_get_width_fit(ext->list) - lv_obj_get_width(label));
}
}
/**
@@ -685,7 +689,11 @@ static lv_design_res_t lv_dropdown_design(lv_obj_t * ddlist, const lv_area_t * c
const char * txt;
txt = ext->dir != LV_DIR_LEFT ? opt_txt : ext->symbol;
bool rev = false;
if(ext->dir == LV_DIR_LEFT) rev = true;
if(lv_obj_get_base_dir(ddlist) == LV_BIDI_DIR_RTL) rev = true;
txt = rev ? ext->symbol : opt_txt;
if(txt) {
_lv_txt_get_size(&txt_size, txt, label_dsc.font, label_dsc.letter_space, label_dsc.line_space, LV_COORD_MAX,
label_dsc.flag);
@@ -705,7 +713,7 @@ static lv_design_res_t lv_dropdown_design(lv_obj_t * ddlist, const lv_area_t * c
lv_draw_label(&txt_area, clip_area, &label_dsc, txt, NULL);
}
txt = ext->dir != LV_DIR_LEFT ? ext->symbol : opt_txt;
txt = rev ? opt_txt : ext->symbol;
if(txt) {
_lv_txt_get_size(&txt_size, txt, label_dsc.font, label_dsc.letter_space, label_dsc.line_space, LV_COORD_MAX,
label_dsc.flag);