add separate codepath for handling layout of moving gadgets

these get sized and positioned in a passthrough manner, so avoid doing any calc
This commit is contained in:
Mike Blumenkrantz 2016-09-19 14:53:20 -04:00
parent 30b07c6558
commit ef5ba9f35e
1 changed files with 14 additions and 9 deletions

View File

@ -529,16 +529,21 @@ _site_layout(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data)
int ww, hh, ow, oh;
if (!zgc->display) continue;
_site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh);
if (zgc->x > -1.0)
if (zgc->moving)
_site_gadget_resize(zgc->gadget, w, h, &ww, &hh, &ow, &oh);
else
{
gx = zgc->x * w;
gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax);
}
if (zgc->y > -1.0)
{
gy = zgc->y * h;
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay);
_site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh);
if (zgc->x > -1.0)
{
gx = zgc->x * w;
gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax);
}
if (zgc->y > -1.0)
{
gy = zgc->y * h;
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay);
}
}
if (zgs->gravity)
{