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

Fix lv_page_glue_obj() interface for lv_binding_micropython. (#1759)

This commit is contained in:
rockindy 2020-08-31 16:15:42 +08:00 committed by GitHub
parent 03fa6b492c
commit 075fe54537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
/*=====================