clamp expanding gadget size to 0 to prevent sizing overflows

if the expanded size is negative then the size should be 0 and the gadget is
not visible
This commit is contained in:
Mike Blumenkrantz 2017-10-06 11:37:50 -04:00
parent 7c726172e4
commit 6f186db24b
1 changed files with 2 additions and 0 deletions

View File

@ -799,6 +799,7 @@ _site_layout_orient(Evas_Object *o, E_Gadget_Site *zgs)
else
size->size.w = size->clipped.w += abs(gw - avg);
size->size.w = size->clipped.w -= size->after.w / 2;
size->size.w = size->clipped.w = MAX(size->size.w, 0);
rw -= size->size.w;
}
}
@ -822,6 +823,7 @@ _site_layout_orient(Evas_Object *o, E_Gadget_Site *zgs)
else
size->size.h = size->clipped.h += abs(gh - avg);
size->size.h = size->clipped.h -= size->after.h / 2;
size->size.h = size->clipped.h = MAX(size->size.h, 0);
rh -= size->size.h;
}
}