merge master

This commit is contained in:
Gabor Kiss-Vamosi
2019-04-02 06:49:05 +02:00
3 changed files with 11 additions and 6 deletions

View File

@@ -288,14 +288,18 @@ static void lv_refr_area(const lv_area_t * area_p)
tmp.x1 = 0;
tmp.x2 = 0;
tmp.y1 = 0;
tmp.y2 = max_row;
lv_coord_t y_tmp = max_row;
lv_coord_t y_tmp = max_row - 1;
do {
tmp.y2 = y_tmp;
disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp);
y_tmp --; /*Decrement the number of line until it is rounded to a smaller (or equal) value then the original. */
} while(lv_area_get_height(&tmp) > max_row && y_tmp != 0);
disp_refr->driver.rounder_cb(&tmp);
/*If this height fits into `max_row` then fine*/
if(lv_area_get_height(&tmp) <= max_row) break;
/*Decrement the height of the area until it fits into `max_row` after rounding*/
y_tmp --;
} while(y_tmp != 0);
if(y_tmp == 0) {
LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to small VDB)");

View File

@@ -710,6 +710,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
} else if(c == LV_GROUP_KEY_ESC) {
if(ext->opened) {
ext->opened = 0;
ext->sel_opt_id = ext->sel_opt_id_ori;
lv_ddlist_refr_size(ddlist, true);
}
}