1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(btnmatrix): fix extra draw size calculation to not clip shadow

This commit is contained in:
Gabor Kiss-Vamosi 2022-07-03 10:58:19 +02:00
parent 77d726efb2
commit 7ada1301c2

View File

@ -399,13 +399,10 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_point_t p;
if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
lv_coord_t * s = lv_event_get_param(e);
if(has_popovers_in_top_row(obj)) {
/*reserve one row worth of extra space to account for popovers in the top row*/
*s = btnm->row_cnt > 0 ? lv_obj_get_content_height(obj) / btnm->row_cnt : 0;
}
else {
*s = 0;
lv_coord_t s = btnm->row_cnt > 0 ? lv_obj_get_content_height(obj) / btnm->row_cnt : 0;
lv_event_set_ext_draw_size(e, s);
}
}
if(code == LV_EVENT_STYLE_CHANGED) {