genlist/gengrid: Use pan object geometry for focus highlight calculation
authorAnil Kumar Nahak <ak.nahak@samsung.com>
Fri, 9 May 2014 16:07:57 +0000 (01:07 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 9 May 2014 16:07:58 +0000 (01:07 +0900)
Summary: Genlist/gengrid object geometry was used before this patch but using the pan object geometry is more correct. This can be reproduced when the size of "elm.swallow.content" part is smaller then the size of scroller object, focus animtaion on items is jerky.

Reviewers: raster, seoz, singh.amitesh

CC: nirajkr
Differential Revision: https://phab.enlightenment.org/D818

src/lib/elm_gengrid.c
src/lib/elm_genlist.c

index 38063bd..ae05e28 100644 (file)
@@ -4280,7 +4280,7 @@ _elm_gengrid_elm_widget_focus_highlight_geometry_get(Eo *obj, Elm_Gengrid_Data *
 {
    Evas_Coord ox, oy, oh, ow, item_x = 0, item_y = 0, item_w = 0, item_h = 0;
 
-   evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
+   evas_object_geometry_get(sd->pan_obj, &ox, &oy, &ow, &oh);
 
    if (sd->focused_item)
      {
index 6567448..79cfb4e 100644 (file)
@@ -7422,7 +7422,7 @@ _elm_genlist_elm_widget_focus_highlight_geometry_get(Eo *obj EINA_UNUSED, Elm_Ge
 {
    Evas_Coord ox, oy, oh, item_x = 0, item_y = 0, item_w = 0, item_h = 0;
 
-   evas_object_geometry_get(obj, &ox, &oy, NULL, &oh);
+   evas_object_geometry_get(sd->pan_obj, &ox, &oy, NULL, &oh);
 
    if (sd->focused_item)
      {