From: discomfitor Date: Wed, 27 Jul 2011 06:50:56 +0000 (+0000) Subject: allow tooltips to better choose their orientation X-Git-Tag: BUILDME~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=670e4cc408ff3460e7b98ec1450efa14e7d3c556;p=framework%2Fuifw%2Felementary.git allow tooltips to better choose their orientation git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@61793 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index 18f5432..9736996 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -402,6 +402,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);