list: always apply new size hints for subobjects
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 25 Feb 2016 23:01:54 +0000 (18:01 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 25 Feb 2016 23:03:18 +0000 (18:03 -0500)
if a content's size hints change, reapplying the list's size hints
to override existing hints is required to prevent some list items from
having a bad layout

@fix

legacy/elementary/src/lib/elm_list.c

index 5788c9d..429daf2 100644 (file)
@@ -934,20 +934,6 @@ _items_fix(Evas_Object *obj)
                        evas_object_color_set(it->end, 0, 0, 0, 0);
                        it->dummy_end = EINA_TRUE;
                     }
-                  if (it->icon)
-                    {
-                       evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
-                       evas_object_size_hint_max_set(it->icon, 99999, 99999);
-                       edje_object_part_swallow
-                          (VIEW(it), "elm.swallow.icon", it->icon);
-                    }
-                  if (it->end)
-                    {
-                       evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
-                       evas_object_size_hint_max_set(it->end, 99999, 99999);
-                       edje_object_part_swallow
-                          (VIEW(it), "elm.swallow.end", it->end);
-                    }
                   if (eina_list_count(sd->items) == 1)
                     {
                        edje_object_signal_emit
@@ -1016,7 +1002,20 @@ _items_fix(Evas_Object *obj)
              it->fixed = EINA_TRUE;
              it->is_even = it->even;
           }
-
+        if (it->icon)
+          {
+             evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
+             evas_object_size_hint_max_set(it->icon, 99999, 99999);
+             edje_object_part_swallow
+                (VIEW(it), "elm.swallow.icon", it->icon);
+          }
+        if (it->end)
+          {
+             evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
+             evas_object_size_hint_max_set(it->end, 99999, 99999);
+             edje_object_part_swallow
+                (VIEW(it), "elm.swallow.end", it->end);
+          }
         if (!it->is_separator)
           i++;
      }