elm.hoversel: fix item size calculation

Summary:
The way to find the position of hoversel expansion is based on geometry
currently, but it causes errors when theme is not made as expected.
This patch makes hoversel use string to find the right position and
calculate item width correctly when items are shorter than hoversel itself.

Test Plan:
elementary_test -to hoversel
(error case shows in tizen mobile device when screen is rotated)

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4484

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Jee-Yong Um 2016-12-16 15:02:06 -08:00 committed by Cedric BAIL
parent 9393560178
commit 4ea7effe70
1 changed files with 3 additions and 2 deletions

View File

@ -282,7 +282,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)
@ -300,7 +300,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)
@ -328,6 +328,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);
}