mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Highlight selected option if show_selected is false (#1810)
This commit is contained in:
parent
4d87007c95
commit
18db4d83bc
@ -825,12 +825,10 @@ static lv_design_res_t lv_dropdown_page_design(lv_obj_t * page, const lv_area_t
|
||||
draw_box(ddlist, &clip_area_core, ext->pr_opt_id, LV_STATE_PRESSED);
|
||||
}
|
||||
|
||||
if(ext->show_selected) {
|
||||
draw_box(ddlist, &clip_area_core, ext->sel_opt_id, LV_STATE_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*Post draw when the children are drawn*/
|
||||
else if(mode == LV_DESIGN_DRAW_POST) {
|
||||
/*Draw the scrollbar in the ancestor page design function*/
|
||||
@ -853,12 +851,10 @@ static lv_design_res_t lv_dropdown_page_design(lv_obj_t * page, const lv_area_t
|
||||
draw_box_label(ddlist, &clip_area_core, ext->pr_opt_id, LV_STATE_PRESSED);
|
||||
}
|
||||
|
||||
if(ext->show_selected) {
|
||||
draw_box_label(ddlist, &clip_area_core, ext->sel_opt_id, LV_STATE_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return LV_DESIGN_RES_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user