Hello!
This patch is intended for the edje test program so that it take in account max
width and height for elements.
Should be bug free :)
Cheers!
--
ilLogict
Website: http://illogict.online.fr
E-Mail: [EMAIL PROTECTED]
AIM/NIM: illogict
Yahoo: illogict
MSN: [EMAIL PROTECTED]
ICQ: #74274856
Infos: E17 rocks!
Le nettoyage de ligne, quelle chose efficace ! (1900->4700 @60dB)Index: edje_main.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.58
diff -u -r1.58 edje_main.c
--- edje_main.c 24 Apr 2005 09:13:26 -0000 1.58
+++ edje_main.c 16 Aug 2005 21:58:32 -0000
@@ -396,6 +396,7 @@
{
Evas_Coord x, y, w, h;
Evas_Coord minw, minh;
+ Evas_Coord maxw, maxh;
int hdir, vdir;
evas_object_geometry_get(de->edje, &x, &y, &w, &h);
@@ -407,10 +408,14 @@
h += 30;
minw = 20 + de->minw;
minh = 30 + de->minh;
+ maxw = 20 + de->maxw;
+ maxh = 30 + de->maxh;
+
if (hdir > 0)
{
w += ev->cur.canvas.x - ev->prev.canvas.x;
if (w < minw) w = minw;
+ else if (w > maxw) w = maxw;
}
else
{
@@ -421,11 +426,17 @@
x += w - minw;
w = minw;
}
+ if (w > maxw)
+ {
+ x -= w - maxw;
+ w = maxw;
+ }
}
if (vdir > 0)
{
h += ev->cur.canvas.y - ev->prev.canvas.y;
if (h < minh) h = minh;
+ if (h > maxh) h = maxh;
}
else
{
@@ -436,6 +447,11 @@
y += h - minh;
h = minh;
}
+ if (h > maxh)
+ {
+ y -= h - maxh;
+ h = maxh;
+ }
}
evas_object_move(de->edje, x + 10, y + 20);
evas_object_resize(de->edje, w - 20, h - 30);