1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

minor formatting

This commit is contained in:
Gabor Kiss-Vamosi 2019-05-17 16:59:12 +02:00
parent 1f334ba88b
commit ca19c7d92f
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;