allow tooltips to better choose their orientation

SVN revision: 61793
This commit is contained in:
Mike Blumenkrantz 2011-07-27 06:50:56 +00:00
parent c061290560
commit 81c6fb457d
1 changed files with 10 additions and 0 deletions

View File

@ -410,6 +410,16 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
else if (ty + th >= ch - tt->pad.by) ty = ch - th - tt->pad.by;
}
if (tx + tw > cw)
{
if (abs(tx - tw) < (tx + tw) - cw)
tx -= tw;
}
if (ty + th > ch)
{
if (abs(ty - th) < (ty + th) - ch)
ty -= th;
}
evas_object_move(tt->tt_win ? : tt->tooltip, tx, ty);
evas_object_resize(tt->tt_win ? : tt->tooltip, tw, th);
evas_object_show(tt->tooltip);