clamp bryce position to its parent zone

fixes case where large bryces could overflow their zones

ref T4784
This commit is contained in:
Mike Blumenkrantz 2016-10-31 11:17:48 -04:00
parent fbb17af2d6
commit bf1075ff4b
1 changed files with 2 additions and 0 deletions

View File

@ -138,7 +138,9 @@ _bryce_position(Bryce *b, int w, int h, int *nx, int *ny)
else
evas_object_geometry_get(b->parent, &ox, &oy, &ow, &oh);
x = ox + (ow - w) / 2;
x = E_CLAMP(x, ox, ox + ow / 2);
y = oy + (oh - h) / 2;
y = E_CLAMP(y, oy, oy + oh / 2);
an = e_gadget_site_anchor_get(b->site);
if (an & E_GADGET_SITE_ANCHOR_LEFT)
x = ox;