=============================================================================
hoversel: fix hover position in hoversel, when it goes out of the viewport
Summary:
Hoversel Widget is designed in such a way that it accepts top/bottom/left/right directions , internally it uses hover widget which does not take care if its content goes of it's parent (Elm_Win in most c~
Signed-off-by: divyesh purohit <div.purohit@samsung.com>
Signed-off-by: Jee-Yong Um <conr2d@gmail.com>
Test Plan:
Open entry widget and right click to show a hoversel widget, check if the hoversel or hover content goes out of the window.
this is what hoversel would look like after this patch {F27551}
Screenshots of top-left / top-right/ bottom-left and bottom-right corners in entry after this patch
{F27553}
{F27554}
{F27555}
{F27557}
Reviewers: shilpasingh, conr2d, raster, cedric, Hermet
Subscribers: rajeshps, govi
Projects: #elementary
Maniphest Tasks: T2965
Differential Revision: https://phab.enlightenment.org/D3513
=============================================================================
Signed-Off-By: Jee-Yong Um <jc9.um@samsung.com>
Change-Id: I8bd12abb425234ad15edec30281987905dbdbd85
if (xx < 0) xx = x;
if ((xx + ww) > (x + w))
- ww = (x + w) - xx;
+ {
+ if ((obj_x + obj_w - x) > ((x + w) - obj_x))
+ {
+ elm_layout_signal_emit(sd->hover, "elm,state,align,right", "elm");
+ if ((obj_x + obj_w - ww) < x)
+ ww = obj_x + obj_w - x;
+ }
+ else
+ {
+ elm_layout_signal_emit(sd->hover, "elm,state,align,default", "elm");
+ ww = (x + w) - xx;
+ }
+ }
}
-
evas_object_size_hint_min_set(sd->spacer, ww, hh);
// TIZEN_ONLY(20150828): shrink item width expanding over hover parent