diff options
-rw-r--r-- | src/lib/elm_list.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index d18d669e5..99f6da70e 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -3009,19 +3009,27 @@ _elm_list_item_coordinates_adjust(Elm_List_Item *it, *h = ih; if (!sd->h_mode) { - //TODO: Enhance it later. declare a macro in elm_macros.h - if ((ix < vx) || (ix + iw) > (vx + vw) || (iy + ih) > (vy + vh)) - *y = iy - ih; + if ((iy + ih) > (vy + vh)) + *y = vh - ih; else if (iy < vy) - *y = iy + ih; + { + if ((abs(iy) + 1) == ih) + *y = iy + ih; + else + *y = iy + ih - (ih - abs(iy)); + } } else { - //TODO: Enhance it later. declare a macro in elm_macros.h - if ((iy < vy) || (ix + iw) > (vx + vw) || (iy + ih) > (vy + vh)) - *x = ix - iw; + if ((ix + iw) > (vx + vw)) + *x = vw - iw; else if (ix < vx) - *x = ix + iw; + { + if ((abs(ix) + 1) == iw) + *x = ix + iw; + else + *x = ix + iw - (iw - abs(ix)); + } } } |