genlist : fix direction calc for adjust align get 72/231572/1
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>
Wed, 22 Apr 2020 07:08:44 +0000 (16:08 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Wed, 22 Apr 2020 12:10:45 +0000 (12:10 +0000)
Change-Id: I8aeb9067089c83327b583574dcc6f25073e38a61
Signed-off-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
(cherry picked from commit dc3fa9f66766fbb008e327f837268b31136317b6)

src/lib/elementary_tizen/elm_genlist.c

index 239f64f..24691c4 100644 (file)
@@ -484,7 +484,10 @@ _adjust_item_align(Elm_Gen_Item *it, Eina_Bool should_find)
    //
 
    last = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
-   direction = GL_IT(adjust_item)->scrl_y - GL_IT(sd->aligned_item)->scrl_y;
+   Evas_Coord oy = 0, oh = 0;
+   evas_object_geometry_get(WIDGET(it), NULL, &oy, NULL, &oh);
+   direction = GL_IT(adjust_item)->scrl_y - (oy + oh / 2);
+
    while (adjust_item && loop_count < 10)
      {
         //TIZEN_ONLY(20180315) : Align item calculation optimization