fix group item header placement when genlist is not at 0,0 - ppl dont
authorCarsten Haitzler <raster@rasterman.com>
Sat, 16 Jun 2012 12:55:29 +0000 (12:55 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Sat, 16 Jun 2012 12:55:29 +0000 (12:55 +0000)
test this :)

SVN revision: 72234

src/lib/elm_genlist.c

index bc94bdf..cb1e85d 100644 (file)
@@ -2641,8 +2641,10 @@ _group_items_recalc(void *data)
    Widget_Data *wd = data;
    Eina_List *l;
    Elm_Gen_Item *git;
+   Evas_Coord ox, oy;
 
    evas_event_freeze(evas_object_evas_get(wd->obj));
+   evas_object_geometry_get(wd->pan_smart, &ox, &oy, NULL, NULL);
    EINA_LIST_FOREACH(wd->group_items, l, git)
      {
         if (git->item->want_realize)
@@ -2650,6 +2652,8 @@ _group_items_recalc(void *data)
              if (!git->realized)
                _item_realize(git, 0, EINA_FALSE);
              evas_object_resize(VIEW(git), wd->minw, git->item->h);
+             git->item->scrl_x = git->item->block->x + git->x - git->wd->pan_x + ox;
+             git->item->scrl_y = git->item->block->y + git->y - git->wd->pan_y + oy;
              evas_object_move(VIEW(git), git->item->scrl_x, git->item->scrl_y);
              evas_object_show(VIEW(git));
              evas_object_raise(VIEW(git));