Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_iconbox.c ewl_image.c 


Log Message:
Fix image display when using ewl_image_constrain_set.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- ewl_iconbox.c       14 Mar 2006 04:48:06 -0000      1.110
+++ ewl_iconbox.c       14 Mar 2006 07:24:35 -0000      1.111
@@ -1099,7 +1099,7 @@
        DCHECK_TYPE("icon", icon, EWL_ICON_TYPE);
 
        ewl_image_file_set(EWL_IMAGE(icon->image), filename, NULL);
-       ewl_image_size_set(EWL_IMAGE(icon->image), 64, 64);
+       ewl_image_constrain_set(EWL_IMAGE(icon->image), 64);
        ewl_image_proportional_set(EWL_IMAGE(icon->image), TRUE);       
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewl_image.c 13 Mar 2006 16:19:34 -0000      1.30
+++ ewl_image.c 14 Mar 2006 07:24:35 -0000      1.31
@@ -317,15 +317,20 @@
        /*
         * Use set bounds if available, otherwise original image size.
         */
-       if (i->aw)
-               aw = i->aw;
-       else
-               aw = i->ow;
-
-       if (i->ah)
-               ah = i->ah;
-       else
-               ah = i->oh;
+       if (i->cs) {
+               aw = ah = i->cs;
+       }
+       else {
+               if (i->aw)
+                       aw = i->aw;
+               else
+                       aw = i->ow;
+
+               if (i->ah)
+                       ah = i->ah;
+               else
+                       ah = i->oh;
+       }
 
        /*
         * Check for proportional scaling and adjust to fit.
@@ -520,15 +525,20 @@
        /*
         * Bound to absolute size.
         */
-       if (i->aw)
-               ww = i->aw;
-       else
-               ww = i->ow;
-
-       if (i->ah)
-               hh = i->ah;
-       else
-               hh = i->oh;
+       if (i->cs) {
+               ww = hh = i->cs;
+       }
+       else {
+               if (i->aw)
+                       ww = i->aw;
+               else
+                       ww = i->ow;
+
+               if (i->ah)
+                       hh = i->ah;
+               else
+                       hh = i->oh;
+       }
 
        ewl_object_preferred_inner_w_set(EWL_OBJECT(i), sw * ww);
        ewl_object_preferred_inner_h_set(EWL_OBJECT(i), sh * hh);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to