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; int ww, hh, ow, oh;
if (!zgc->display) continue; if (!zgc->display) continue;
_site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh); if (zgc->moving)
if (zgc->x > -1.0) _site_gadget_resize(zgc->gadget, w, h, &ww, &hh, &ow, &oh);
else
{ {
gx = zgc->x * w; _site_gadget_resize(zgc->gadget, w * zgc->w, h * zgc->h, &ww, &hh, &ow, &oh);
gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax); if (zgc->x > -1.0)
} {
if (zgc->y > -1.0) gx = zgc->x * w;
{ gx += (Evas_Coord)(((double)(ww - ow)) * 0.5 * -ax);
gy = zgc->y * h; }
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay); if (zgc->y > -1.0)
{
gy = zgc->y * h;
gy += (Evas_Coord)(((double)(hh - oh)) * 0.5 * -ay);
}
} }
if (zgs->gravity) if (zgs->gravity)
{ {