jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f7a4a2b2a04d3135f874bc0760db90a247b8f270

commit f7a4a2b2a04d3135f874bc0760db90a247b8f270
Author: Jee-Yong Um <jc9...@samsung.com>
Date:   Fri Apr 8 17:47:11 2016 +0900

    list: fix item highlight geometry correctly
    
    Summary:
    Calculation for item highlight geometry is incorrect when item
    is larger than viewport geometry.
    This patch adjusts highlight geometry to fit visible item size.
    
    Test Plan: enventor (look "Settings-Text Editor-Font Names" list)
    
    Reviewers: Jaehyun_Cho
    
    Subscribers: jpeg, cedric
    
    Differential Revision: https://phab.enlightenment.org/D3738
---
 src/lib/elementary/elm_list.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index 14164dc..9a0e71b 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -3097,30 +3097,27 @@ _elm_list_item_coordinates_adjust(Elm_List_Item_Data 
*it,
                                   Evas_Coord *w,
                                   Evas_Coord *h)
 {
-   ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
-
    Evas_Coord ix, iy, iw, ih, vx, vy, vw, vh;
 
-   evas_object_geometry_get(sd->hit_rect, &vx, &vy, &vw, &vh);
+   elm_interface_scrollable_content_viewport_geometry_get(WIDGET(it), &vx, 
&vy, &vw, &vh);
    evas_object_geometry_get(VIEW(it), &ix, &iy, &iw, &ih);
+
+   if (iy < vy)
+     iy = vy;
+
+   if ((iy + ih) > (vy + vh))
+     ih = (vy + vh - iy);
+
+   if (ix < vx)
+     ix = vx;
+
+   if ((ix + iw) > (vx + vw))
+     iw = (vx + vw - ix);
+
    *x = ix;
    *y = iy;
    *w = iw;
    *h = ih;
-   if (!sd->h_mode)
-     {
-        if (ELM_RECTS_X_AXIS_OUT(ix, iy, iw, ih, vx, vy, vw, vh))
-          *y = iy - ih;
-        else if (iy < vy)
-          *y = iy + ih;
-     }
-   else
-     {
-        if (ELM_RECTS_Y_AXIS_OUT(ix, iy, iw, ih, vx, vy, vw, vh))
-          *x = ix - iw;
-        else if (ix < vx)
-          *x = ix + iw;
-     }
 }
 
 EOLIAN static void

-- 


Reply via email to