Edje size_min_restricted_calc: Hopefully fixed textblock handling.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 15:29:50 +0000 (15:29 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 15:29:50 +0000 (15:29 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@59010 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/edje_util.c

index 511ee73..113f64e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,3 +80,7 @@
        * Add Feature: Support explicit shadow direction with extra effect
         param (optional). Default as before.
 
+2011-04-28  Tom Hacohen (TAsn)
+
+        * size_min_restricted_calc: Fixed textblock handling.
+
index cfbc43d..6408c8b 100644 (file)
@@ -2203,6 +2203,17 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
               {
                  if (!ep->chosen_description->fixed.w)
                    {
+                      if ((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK))
+                        {
+                            Evas_Coord tb_mw;
+                            evas_object_textblock_size_formatted_get(ep->object,
+                               &tb_mw, NULL);
+                            tb_mw -= ep->req.w;
+                            if (tb_mw > w)
+                              {
+                                 w = tb_mw;
+                              }
+                        }
                       if (w > maxw)
                         {
                            maxw = w;
@@ -2210,10 +2221,6 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
                            pep = ep;
                            didw = 1;
                         }
-                      if ((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK))
-                        {
-                           /* FIXME: do something */
-                        }
                    }
                  if (!ep->chosen_description->fixed.h)
                    {