From 7ada1301c2ee113a5184618538b979f6d9912239 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 3 Jul 2022 10:58:19 +0200 Subject: [PATCH] fix(btnmatrix): fix extra draw size calculation to not clip shadow --- src/widgets/lv_btnmatrix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/widgets/lv_btnmatrix.c b/src/widgets/lv_btnmatrix.c index 62f86f794..92a4d2fe3 100644 --- a/src/widgets/lv_btnmatrix.c +++ b/src/widgets/lv_btnmatrix.c @@ -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) {