allow adding extra label to list buttons

This commit is contained in:
Gabor Kiss-Vamosi
2020-08-10 11:36:43 +02:00
parent ebaeb1bf7c
commit 6fd7bcf172
2 changed files with 5 additions and 4 deletions

View File

@@ -12,6 +12,7 @@
- Fix text decor (udnerline strikethrough) with older versions of font converter - Fix text decor (udnerline strikethrough) with older versions of font converter
- Fix setting local style property multiple times - Fix setting local style property multiple times
- Add missing background drawing and radius handling to image button - Add missing background drawing and radius handling to image button
- Allow adding extra label to list buttons
## v7.3.0 (04.08.2020) ## v7.3.0 (04.08.2020)

View File

@@ -365,11 +365,11 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn)
{ {
LV_ASSERT_OBJ(btn, "lv_btn"); LV_ASSERT_OBJ(btn, "lv_btn");
lv_obj_t * label = lv_obj_get_child(btn, NULL); lv_obj_t * label = lv_obj_get_child_back(btn, NULL);
if(label == NULL) return NULL; if(label == NULL) return NULL;
while(lv_list_is_list_label(label) == false) { while(lv_list_is_list_label(label) == false) {
label = lv_obj_get_child(btn, label); label = lv_obj_get_child_back(btn, label);
if(label == NULL) break; if(label == NULL) break;
} }
@@ -386,11 +386,11 @@ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn)
LV_ASSERT_OBJ(btn, "lv_btn"); LV_ASSERT_OBJ(btn, "lv_btn");
#if LV_USE_IMG != 0 #if LV_USE_IMG != 0
lv_obj_t * img = lv_obj_get_child(btn, NULL); lv_obj_t * img = lv_obj_get_child_back(btn, NULL);
if(img == NULL) return NULL; if(img == NULL) return NULL;
while(lv_list_is_list_img(img) == false) { while(lv_list_is_list_img(img) == false) {
img = lv_obj_get_child(btn, img); img = lv_obj_get_child_back(btn, img);
if(img == NULL) break; if(img == NULL) break;
} }