refactor(dropdown): rename lv_dropdown_list_class to lv_dropdownlist_class

It avoids ambiguity. See  https://github.com/lvgl/lvgl/issues/1763#issuecomment-804357591
This commit is contained in:
Gabor Kiss-Vamosi 2021-03-25 20:03:49 +01:00
parent 63bc72e53a
commit 966f6e1727
4 changed files with 12 additions and 12 deletions

View File

@ -305,7 +305,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->light);
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->pressed);
}
else if(lv_obj_check_type(obj, &lv_dropdown_list_class)) {
else if(lv_obj_check_type(obj, &lv_dropdownlist_class)) {
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->light);
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_DEFAULT, &styles->scrollbar);
lv_obj_add_style(obj, LV_PART_SELECTED, LV_STATE_DEFAULT, &styles->light);

View File

@ -784,7 +784,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->outline_primary);
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->outline_secondary);
}
else if(lv_obj_check_type(obj, &lv_dropdown_list_class)) {
else if(lv_obj_check_type(obj, &lv_dropdownlist_class)) {
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->line_space_large);
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_DEFAULT, &styles->scrollbar);

View File

@ -25,7 +25,7 @@
* DEFINES
*********************/
#define MY_CLASS &lv_dropdown_class
#define MY_CLASS_LIST &lv_dropdown_list_class
#define MY_CLASS_LIST &lv_dropdownlist_class
#define LV_DROPDOWN_PR_NONE 0xFFFF
@ -42,8 +42,8 @@ static void lv_dropdown_destructor(lv_obj_t * obj);
static void lv_dropdown_event(lv_obj_t * obj, lv_event_t e);
static void draw_main(lv_obj_t * obj);
static void lv_dropdown_list_constructor(lv_obj_t * obj);
static void lv_dropdown_list_destructor(lv_obj_t * list_obj);
static void lv_dropdownlist_constructor(lv_obj_t * obj);
static void lv_dropdownlist_destructor(lv_obj_t * list_obj);
static void lv_dropdown_list_event(lv_obj_t * list, lv_event_t e);
static void draw_list(lv_obj_t * obj);
@ -67,9 +67,9 @@ const lv_obj_class_t lv_dropdown_class = {
.base_class = &lv_obj_class
};
const lv_obj_class_t lv_dropdown_list_class = {
.constructor_cb = lv_dropdown_list_constructor,
.destructor_cb = lv_dropdown_list_destructor,
const lv_obj_class_t lv_dropdownlist_class = {
.constructor_cb = lv_dropdownlist_constructor,
.destructor_cb = lv_dropdownlist_destructor,
.event_cb = lv_dropdown_list_event,
.instance_size = sizeof(lv_dropdown_list_t),
.base_class = &lv_obj_class
@ -532,7 +532,7 @@ void lv_dropdown_close(lv_obj_t * obj)
static lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent)
{
return lv_obj_create_from_class(&lv_dropdown_list_class, parent);
return lv_obj_create_from_class(&lv_dropdownlist_class, parent);
}
static void lv_dropdown_constructor(lv_obj_t * obj)
@ -577,7 +577,7 @@ static void lv_dropdown_destructor(lv_obj_t * obj)
}
}
static void lv_dropdown_list_constructor(lv_obj_t * obj)
static void lv_dropdownlist_constructor(lv_obj_t * obj)
{
LV_TRACE_OBJ_CREATE("begin");
@ -587,7 +587,7 @@ static void lv_dropdown_list_constructor(lv_obj_t * obj)
LV_TRACE_OBJ_CREATE("finished");
}
static void lv_dropdown_list_destructor(lv_obj_t * list_obj)
static void lv_dropdownlist_destructor(lv_obj_t * list_obj)
{
lv_dropdown_list_t * list = (lv_dropdown_list_t *)list_obj;
lv_obj_t * dropdown_obj = list->dropdown;

View File

@ -57,7 +57,7 @@ typedef struct {
}lv_dropdown_list_t;
extern const lv_obj_class_t lv_dropdown_class;
extern const lv_obj_class_t lv_dropdown_list_class;
extern const lv_obj_class_t lv_dropdownlist_class;
/**********************
* GLOBAL PROTOTYPES