Elementary genlist: Enabling _show_region_hook to handle the genlist item sub
objects hierarchical region show. Scroller pan geometry is included, as scrolelr is smart object, not in genlist hierarchy. Patch By Govindaraju SM <govi.sm@samsung.com> SVN revision: 56981
This commit is contained in:
parent
5028537bc3
commit
9802915d85
|
@ -447,7 +447,7 @@ static void _item_cache_zero(Widget_Data *wd);
|
|||
static void _del_hook(Evas_Object *obj);
|
||||
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
|
||||
static void _theme_hook(Evas_Object *obj);
|
||||
//static void _show_region_hook(void *data, Evas_Object *obj);
|
||||
static void _show_region_hook(void *data, Evas_Object *obj);
|
||||
static void _sizing_eval(Evas_Object *obj);
|
||||
static void _item_unrealize(Elm_Genlist_Item *it);
|
||||
static void _item_block_unrealize(Item_Block *itb);
|
||||
|
@ -763,17 +763,18 @@ _theme_hook(Evas_Object *obj)
|
|||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
/*
|
||||
static void
|
||||
_show_region_hook(void *data, Evas_Object *obj)
|
||||
{
|
||||
static void
|
||||
_show_region_hook(void *data, Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Coord x, y, w, h;
|
||||
if (!wd) return;
|
||||
elm_widget_show_region_get(obj, &x, &y, &w, &h);
|
||||
//x & y are screen coordinates, Add with pan coordinates
|
||||
x += wd->pan_x;
|
||||
y += wd->pan_y;
|
||||
elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
static void
|
||||
_sizing_eval(Evas_Object *obj)
|
||||
|
@ -2616,6 +2617,7 @@ elm_genlist_add(Evas_Object *parent)
|
|||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_event_hook_set(obj, _event_hook);
|
||||
elm_widget_on_show_region_hook_set(obj, _show_region_hook, obj);
|
||||
|
||||
wd->scr = elm_smart_scroller_add(e);
|
||||
elm_smart_scroller_widget_set(wd->scr, obj);
|
||||
|
|
Loading…
Reference in New Issue