update gadget position during a resize from top/left edge

This commit is contained in:
Mike Blumenkrantz 2017-06-23 17:41:39 -04:00
parent d3e4caa57d
commit 5642ed47e8
1 changed files with 8 additions and 2 deletions

View File

@ -643,11 +643,17 @@ _gadget_mouse_resize(E_Gadget_Config *zgc, int t EINA_UNUSED, Ecore_Event_Mouse_
gw = zgc->w * w;
gh = zgc->h * h;
if (zgc->resizing & E_GADGET_SITE_ANCHOR_LEFT)
gw -= (ev->x - zgc->down.x);
{
gw -= (ev->x - zgc->down.x);
zgc->x = ev->x / (double)w;
}
else
gw += (ev->x - zgc->down.x);
if (zgc->resizing & E_GADGET_SITE_ANCHOR_TOP)
gh -= (ev->y - zgc->down.y);
{
gh -= (ev->y - zgc->down.y);
zgc->y = ev->y / (double)h;
}
else
gh += (ev->y - zgc->down.y);
zgc->w = gw / w;