hoversel: fix to calculate item size correctly (screen rotation)
authorJee-Yong Um <jc9.um@samsung.com>
Tue, 13 Dec 2016 10:04:48 +0000 (19:04 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:08 +0000 (14:37 +0900)
Signed-Off-By: Jee-Yong Um <jc9.um@samsung.com>
Change-Id: Iaa60d1f162049f44db0d335f909e601ec908f89e

src/lib/elc_hoversel.c

index 4433a59..c20c0f2 100644 (file)
@@ -301,7 +301,7 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd)
 
    if (sd->horizontal)
      {
-        if (xx < obj_x)
+        if (!strcmp(sd->last_location, "left"))
           {
              xx = x;
              if ((xx + ww) > obj_x)
@@ -319,7 +319,7 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd)
      }
    else
      {
-        if (yy < obj_y)
+        if (!strcmp(sd->last_location, "top"))
           {
              yy = y;
              if ((yy + hh) > obj_y)
@@ -347,6 +347,7 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd)
                }
           }
      }
+   if (ww < obj_w) ww = obj_w;
    evas_object_size_hint_min_set(sd->spacer, ww, hh);
 
    // TIZEN_ONLY(20150828): shrink item width expanding over hover parent