reject gadget site layout attempts only when it would be impossible

a site with orient set is expected to fill using only one axis, so a size
of 0xH or Wx0 is valid in some cases

fix T5806
This commit is contained in:
Mike Blumenkrantz 2017-08-02 08:39:49 -04:00
parent 761e5e7461
commit c650f60aea
1 changed files with 3 additions and 2 deletions

View File

@ -465,9 +465,10 @@ _site_layout_orient(Evas_Object *o, E_Gadget_Site *zgs)
E_Gadget_Config *zgc;
int mw, mh, sw, sh;
evas_object_geometry_get(o, &x, &y, &w, &h);
if ((!w) && (!h)) return;
evas_object_size_hint_min_get(o, &mw, &mh);
evas_object_size_hint_min_get(zgs->layout, &sw, &sh);
evas_object_geometry_get(o, &x, &y, &w, &h);
evas_object_geometry_set(zgs->events, x, y, w, h);
evas_object_box_align_get(o, &ax, &ay);
@ -552,7 +553,6 @@ _site_layout(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data)
E_Gadget_Config *zgc;
evas_object_geometry_get(o, &x, &y, &w, &h);
if ((!w) || (!h)) return;
evas_object_geometry_set(zgs->events, x, y, w, h);
evas_object_box_align_get(o, &ax, &ay);
@ -564,6 +564,7 @@ _site_layout(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data)
_site_layout_orient(o, zgs);
return;
}
if ((!w) || (!h)) return;
EINA_LIST_FOREACH(zgs->gadgets, l, zgc)
{
Evas_Coord gx = xx, gy = yy;