Do set the max to the image size if asked for it
authorsachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 27 Jan 2012 14:32:45 +0000 (14:32 +0000)
committersachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 27 Jan 2012 14:32:45 +0000 (14:32 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67567 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_calc.c

index 3cdbe84..974b6dd 100644 (file)
@@ -1978,8 +1978,8 @@ _edje_part_recalc_single(Edje *ed,
           }
         if (((Edje_Part_Description_Image *)chosen_desc)->image.max.limit)
           {
-             if (w < maxw) maxw = w;
-             if (h < maxh) maxh = h;
+             if ((maxw <= 0) || (w < maxw)) maxw = w;
+             if ((maxh <= 0) || (h < maxh)) maxh = h;
           }
      }