mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Merge branch 'feat/new-scroll' of https://github.com/littlevgl/lvgl into feat/new-scroll
This commit is contained in:
commit
5852852f8b
@ -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*/
|
/*Set the default styles*/
|
||||||
lv_theme_apply(btn, LV_THEME_LIST_BTN);
|
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_btn_set_layout(btn, LV_LAYOUT_ROW_MID);
|
||||||
|
|
||||||
lv_layout_t list_layout = lv_list_get_layout(list);
|
lv_layout_t list_layout = lv_list_get_layout(list);
|
||||||
|
@ -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.
|
* 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 obj pointer to an object on a page
|
||||||
* @param glue true: enable glue, false: disable glue
|
* @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_parent(obj, glue);
|
||||||
lv_obj_set_drag(obj, glue);
|
lv_obj_set_drag(obj, glue);
|
||||||
|
@ -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.
|
* 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 obj pointer to an object on a page
|
||||||
* @param glue true: enable glue, false: disable glue
|
* @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.
|
* Focus on an object. It ensures that the object will be visible on the page.
|
||||||
|
@ -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_OBJ(tileview, LV_OBJX_NAME);
|
||||||
LV_ASSERT_NULL(tileview);
|
LV_ASSERT_NULL(tileview);
|
||||||
|
|
||||||
lv_page_glue_obj(element, true);
|
lv_page_glue_obj(tileview, element, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user