1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(imgbtn) use the correct src in LV_EVENT_GET_SELF_SIZE

This commit is contained in:
Gabor Kiss-Vamosi 2021-07-16 11:57:49 +02:00
parent 3eacc5923c
commit 04c515adac

View File

@ -184,7 +184,7 @@ static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e)
imgbtn->img_src_right[state] == NULL)
{
lv_img_header_t header;
lv_img_decoder_get_info(imgbtn->img_src_mid, &header);
lv_img_decoder_get_info(imgbtn->img_src_mid[state], &header);
p->x = LV_MAX(p->x, header.w);
}
}