Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
edje_calc.c edje_load.c edje_util.c
Log Message:
setting extern min/max size overrides min/max sizes implied by objects
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_calc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- edje_calc.c 5 Sep 2003 07:17:54 -0000 1.15
+++ edje_calc.c 7 Sep 2003 05:16:08 -0000 1.16
@@ -468,9 +468,9 @@
}
maxw = desc->max.w;
maxh = desc->max.h;
- if ((ep->swallow_params.max.w > 0) &&
+ if ((ep->swallow_params.max.w >= 0) &&
(ep->swallow_params.max.w < maxw)) maxw = ep->swallow_params.max.w;
- if ((ep->swallow_params.max.h > 0) &&
+ if ((ep->swallow_params.max.h >= 0) &&
(ep->swallow_params.max.h < maxh)) maxh = ep->swallow_params.max.h;
/* adjust for max size */
if (maxw >= 0)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_load.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- edje_load.c 1 Sep 2003 02:53:08 -0000 1.25
+++ edje_load.c 7 Sep 2003 05:16:08 -0000 1.26
@@ -161,6 +161,11 @@
}
if (rp->part->dragable.confine_id >= 0)
rp->confine_to = evas_list_nth(ed->parts,
rp->part->dragable.confine_id);
+
+ rp->swallow_params.min.w = 0;
+ rp->swallow_params.min.w = 0;
+ rp->swallow_params.max.w = -1;
+ rp->swallow_params.max.h = -1;
}
_edje_ref(ed);
_edje_block(ed);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_util.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- edje_util.c 1 Sep 2003 02:53:08 -0000 1.22
+++ edje_util.c 7 Sep 2003 05:16:08 -0000 1.23
@@ -289,6 +289,10 @@
_edje_object_part_swallow_free_cb,
obj);
type = (char *)evas_object_type_get(obj_swallow);
+ rp->swallow_params.min.w = 0;
+ rp->swallow_params.min.w = 0;
+ rp->swallow_params.max.w = -1;
+ rp->swallow_params.max.h = -1;
if ((type) && (!strcmp(type, "edje")))
{
double w, h;
@@ -312,16 +316,17 @@
rp->swallow_params.max.w = w;
rp->swallow_params.max.h = h;
}
- else
{
- rp->swallow_params.min.w =
- (int)evas_object_data_get(obj_swallow, "\377 edje.minw");
- rp->swallow_params.min.h =
- (int)evas_object_data_get(obj_swallow, "\377 edje.minh");
- rp->swallow_params.max.w =
- (int)evas_object_data_get(obj_swallow, "\377 edje.maxw");
- rp->swallow_params.max.h =
- (int)evas_object_data_get(obj_swallow, "\377 edje.maxh");
+ int w1, h1, w2, h2;
+
+ w1 = (int)evas_object_data_get(obj_swallow, "\377 edje.minw");
+ h1 = (int)evas_object_data_get(obj_swallow, "\377 edje.minh");
+ w2 = (int)evas_object_data_get(obj_swallow, "\377 edje.maxw");
+ h2 = (int)evas_object_data_get(obj_swallow, "\377 edje.maxh");
+ rp->swallow_params.min.w = w1;
+ rp->swallow_params.min.h = h1;
+ if (w2 >= 0) rp->swallow_params.max.w = w2;
+ if (h2 >= 0) rp->swallow_params.max.w = h2;
}
ed->dirty = 1;
_edje_recalc(ed);
@@ -333,8 +338,8 @@
int mw, mh;
mw = minw;
- if (mw < 0) mw = 0;
mh = minh;
+ if (mw < 0) mw = 0;
if (mh < 0) mh = 0;
if (mw > 0)
evas_object_data_set(obj, "\377 edje.minw", (void *)mw);
@@ -352,14 +357,12 @@
int mw, mh;
mw = maxw;
- if (mw < 0) mw = 0;
mh = maxh;
- if (mh < 0) mh = 0;
- if (mw > 0)
+ if (mw >= 0)
evas_object_data_set(obj, "\377 edje.maxw", (void *)mw);
else
evas_object_data_del(obj, "\377 edje.maxw");
- if (mh > 0)
+ if (mh >= 0)
evas_object_data_set(obj, "\377 edje.maxh", (void *)mh);
else
evas_object_data_del(obj, "\377 edje.maxh");
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs