hermet pushed a commit to branch elementary-1.15.

http://git.enlightenment.org/core/elementary.git/commit/?id=9eb86e231e953f63560b2f0fd0a2f6f7b9c93fca

commit 9eb86e231e953f63560b2f0fd0a2f6f7b9c93fca
Author: Shilpa Singh <shilpa.si...@samsung.com>
Date:   Fri Aug 28 19:52:17 2015 +0900

    Elc_Multibuttonentry: Item resize issue on text set
    
    Summary:
    When text is set on a multibuttonentry item, item does not resize
    again based on text.
    
    Signed-off By: Kumar Navneet <k.navn...@samsung.com>
    
    @fix
    
    Test Plan: Set long text to multibuttonentry item, after item is created 
and shown.
    
    Reviewers: woohyun, CHAN, Hermet
    
    Reviewed By: CHAN, Hermet
    
    Subscribers: navnbeet
    
    Differential Revision: https://phab.enlightenment.org/D2967
---
 src/lib/elc_multibuttonentry.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 3ab5641..9caa440 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -583,6 +583,8 @@ _elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo 
*eo_item EINA_UNUSED
                                                     const char *label)
 {
    const char *dest_part = NULL;
+   Evas_Coord minw = -1, minh = -1, boxw;
+   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(WIDGET(item), sd);
 
    if (!part || !strcmp(part, "elm.text"))
      dest_part = "elm.btn.text";
@@ -590,6 +592,18 @@ 
_elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED
      dest_part = part;
 
    edje_object_part_text_escaped_set(elm_layout_edje_get(VIEW(item)), 
dest_part, label);
+
+   elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+   edje_object_size_min_restricted_calc
+     (elm_layout_edje_get(VIEW(item)), &minw, &minh, minw, minh);
+   evas_object_size_hint_min_set(VIEW(item), minw, minh);
+   evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
+
+   if (minw > boxw)
+     {
+         evas_object_size_hint_min_set(VIEW(item), boxw, minh);
+         evas_object_resize(VIEW(item), boxw, minh);
+     }
 }
 
 EOLIAN static const char *

-- 


Reply via email to