}
static Eina_Bool
-_elm_toolbar_item_coordinates_calc(Elm_Object_Item *item,
+_elm_toolbar_item_coordinates_calc(Elm_Toolbar_Item *item,
Elm_Toolbar_Item_Scrollto_Type type,
Evas_Coord *x,
Evas_Coord *y,
static void
-_elm_toolbar_smart_event(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
+_elm_toolbar_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
(void) src;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
Elm_Toolbar_Item *it = NULL;
+ Evas_Coord x, y, w, h;
ELM_TOOLBAR_DATA_GET(obj, sd);
sd->highlighted_item = it;
edje_object_signal_emit(VIEW(sd->highlighted_item), "elm,highlight,on", "elm");
+ if (_elm_toolbar_item_coordinates_calc(
+ sd->highlighted_item, ELM_TOOLBAR_ITEM_SCROLLTO_IN, &x, &y, &w, &h))
+ eo_do(obj, elm_scrollable_interface_region_bring_in(x, y, w, h));
+
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (ret) *ret = EINA_TRUE;
return;
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it);
- if (_elm_toolbar_item_coordinates_calc(it, type, &x, &y, &w, &h))
+ if (_elm_toolbar_item_coordinates_calc(item, type, &x, &y, &w, &h))
eo_do(WIDGET(item), elm_scrollable_interface_content_region_show
(x, y, w, h));
}
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it);
- if (_elm_toolbar_item_coordinates_calc(it, type, &x, &y, &w, &h))
+ if (_elm_toolbar_item_coordinates_calc(item, type, &x, &y, &w, &h))
eo_do(WIDGET(item), elm_scrollable_interface_region_bring_in
(x, y, w, h));
}