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

Merge branch 'feat/new-scroll' of https://github.com/littlevgl/lvgl into feat/new-scroll

This commit is contained in:
Gabor Kiss-Vamosi 2020-09-02 10:56:06 +02:00
commit 5852852f8b
4 changed files with 6 additions and 4 deletions

View File

@ -170,7 +170,7 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * t
/*Set the default styles*/
lv_theme_apply(btn, LV_THEME_LIST_BTN);
lv_page_glue_obj(btn, true);
lv_page_glue_obj(list, btn, true);
lv_btn_set_layout(btn, LV_LAYOUT_ROW_MID);
lv_layout_t list_layout = lv_list_get_layout(list);

View File

@ -457,10 +457,11 @@ bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge)
/**
* Glue the object to the page. After it the page can be moved (dragged) with this object too.
* @param page pointer to a page object
* @param obj pointer to an object on a page
* @param glue true: enable glue, false: disable glue
*/
void lv_page_glue_obj(lv_obj_t * obj, bool glue)
void lv_page_glue_obj(lv_obj_t * page, lv_obj_t * obj, bool glue)
{
lv_obj_set_drag_parent(obj, glue);
lv_obj_set_drag(obj, glue);

View File

@ -378,10 +378,11 @@ bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge);
/**
* Glue the object to the page. After it the page can be moved (dragged) with this object too.
* @param page pointer to a page object
* @param obj pointer to an object on a page
* @param glue true: enable glue, false: disable glue
*/
void lv_page_glue_obj(lv_obj_t * obj, bool glue);
void lv_page_glue_obj(lv_obj_t * page, lv_obj_t * obj, bool glue);
/**
* Focus on an object. It ensures that the object will be visible on the page.

View File

@ -156,7 +156,7 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element)
LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
LV_ASSERT_NULL(tileview);
lv_page_glue_obj(element, true);
lv_page_glue_obj(tileview, element, true);
}
/*=====================