hermet pushed a commit to branch master.

commit 9d8874b737637a607b6fb74b7828f1643ec09022
Author: ChunEon Park <[email protected]>
Date:   Fri May 24 18:34:37 2013 +0900

    elementary/widget - plase update display mode whenever sub object is set
---
 src/lib/elm_widget.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 2141e33..02daad8 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -1037,6 +1037,8 @@ _elm_widget_sub_object_add(Eo *obj, void *_pd, va_list 
*list)
         if (elm_widget_focus_get(sobj)) _parents_focus(obj);
      }
 
+   elm_widget_display_mode_set(sobj,
+                               evas_object_size_hint_display_mode_get(obj));
 end:
    if (ret) *ret = EINA_TRUE;
 }
@@ -4719,22 +4721,21 @@ static void
 _elm_widget_display_mode_set(Eo *obj, void *_pd, va_list *list)
 {
    Evas_Display_Mode dispmode = va_arg(*list, Evas_Display_Mode);
-
+   Evas_Display_Mode prev_dispmode;
    Evas_Object *child;
    Eina_List *l;
 
    Elm_Widget_Smart_Data *sd = _pd;
 
-   if (evas_object_size_hint_display_mode_get(obj) == dispmode) return;
+   prev_dispmode = evas_object_size_hint_display_mode_get(obj);
+
+   if ((prev_dispmode == dispmode) ||
+       (prev_dispmode == EVAS_DISPLAY_MODE_DONT_CHANGE)) return;
+
    evas_object_size_hint_display_mode_set(obj, dispmode);
 
-   //TODO: Need to deal with EVAS_DISPLAY_MODE_INHERIT efficiently.
    EINA_LIST_FOREACH (sd->subobjs, l, child)
-     {
-        if (evas_object_size_hint_display_mode_get(child)
-            != EVAS_DISPLAY_MODE_DONT_CHANGE)
-          elm_widget_display_mode_set(child, dispmode);
-     }
+      elm_widget_display_mode_set(child, dispmode);
 }
 
 EAPI void

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may

Reply via email to