From 2abf55f4c4f6cc0a92bde090004bec68bc3e5c13 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 18 Apr 2019 10:46:16 -0700 Subject: [PATCH 1/2] ddlist: fix animation complete not always clearing selection highlight --- src/lv_objx/lv_ddlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 811108a6c..e6a3096d7 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -916,6 +916,7 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) ext->label->coords.y1 - scrl->coords.y1; lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2); + lv_obj_invalidate(ddlist); } #endif From b477a14fdf2f78b590794cdd79f6dae111ebcad3 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 18 Apr 2019 12:26:40 -0700 Subject: [PATCH 2/2] ddlist: fix animation issues The wrong animation function was used for the delete, and so the animation was never deleted. Must force animation callback on delete, so that the correct selection highlighting is shown. --- src/lv_objx/lv_ddlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index e6a3096d7..5b094acc2 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -847,8 +847,9 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION - lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then + lv_anim_del(ddlist, (lv_anim_fp_t)lv_ddlist_adjust_height); /*If an animation is in progress then it will overwrite this changes*/ + lv_ddlist_anim_cb(ddlist); /*Force animation complete to fix highlight selection*/ } else { lv_anim_t a; a.var = ddlist;