mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
minor formatting
This commit is contained in:
parent
1f334ba88b
commit
ca19c7d92f
@ -288,7 +288,8 @@ void lv_list_set_single_mode(lv_obj_t * list, bool mode)
|
||||
/**
|
||||
* Make a button selected
|
||||
* @param list pointer to a list object
|
||||
* @param btn pointer to a button to selectthe
|
||||
* @param btn pointer to a button to select
|
||||
* NULL to not select any buttons
|
||||
*/
|
||||
void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn)
|
||||
{
|
||||
@ -303,6 +304,9 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn)
|
||||
}
|
||||
|
||||
ext->selected_btn = btn;
|
||||
|
||||
/*Don't forgat whci hbutton was selected.
|
||||
* It will be restored when the list is focused.*/
|
||||
if(btn != NULL) {
|
||||
ext->last_sel = btn;
|
||||
}
|
||||
|
@ -58,8 +58,7 @@ typedef struct
|
||||
uint32_t size; /*the number of items(buttons) in the list*/
|
||||
bool single_mode; /* whether single selected mode is enabled */
|
||||
#if LV_USE_GROUP
|
||||
lv_obj_t *
|
||||
last_sel; /* The last selected button. It will be reverted when the list is focused again */
|
||||
lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */
|
||||
lv_obj_t * selected_btn; /* The button is currently being selected*/
|
||||
#endif
|
||||
} lv_list_ext_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user