From 34e0fefeb3e41deb470a7a39685d0e23eeee60a3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 2 Oct 2020 12:26:12 +0200 Subject: [PATCH] fix imgbtn image switching with empty style --- src/lv_widgets/lv_imgbtn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lv_widgets/lv_imgbtn.c b/src/lv_widgets/lv_imgbtn.c index 6caa98f19..13c3e1621 100644 --- a/src/lv_widgets/lv_imgbtn.c +++ b/src/lv_widgets/lv_imgbtn.c @@ -468,6 +468,9 @@ static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * par imgbtn->ext_draw_pad = LV_MATH_MAX(imgbtn->ext_draw_pad, top); imgbtn->ext_draw_pad = LV_MATH_MAX(imgbtn->ext_draw_pad, bottom); } + else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { + refr_img(imgbtn); + } else if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ }