summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2015-08-28 19:52:17 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-08-28 19:52:17 +0900
commitf18c1dbcb482d97421e88b806ab3f74f551f4aea (patch)
treea3e0566aaf20e6e26de282096300ed741d1a065a
parent80c1840c3cb2f94f123b1051d108eeb023751722 (diff)
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.navneet@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
-rw-r--r--src/lib/elc_multibuttonentry.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 72d49b37d..91f00ad2b 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -594,6 +594,8 @@ _elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED
594 const char *label) 594 const char *label)
595{ 595{
596 const char *dest_part = NULL; 596 const char *dest_part = NULL;
597 Evas_Coord minw = -1, minh = -1, boxw;
598 ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(WIDGET(item), sd);
597 599
598 if (!part || !strcmp(part, "elm.text")) 600 if (!part || !strcmp(part, "elm.text"))
599 dest_part = "elm.btn.text"; 601 dest_part = "elm.btn.text";
@@ -601,6 +603,18 @@ _elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED
601 dest_part = part; 603 dest_part = part;
602 604
603 edje_object_part_text_escaped_set(elm_layout_edje_get(VIEW(item)), dest_part, label); 605 edje_object_part_text_escaped_set(elm_layout_edje_get(VIEW(item)), dest_part, label);
606
607 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
608 edje_object_size_min_restricted_calc
609 (elm_layout_edje_get(VIEW(item)), &minw, &minh, minw, minh);
610 evas_object_size_hint_min_set(VIEW(item), minw, minh);
611 evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
612
613 if (minw > boxw)
614 {
615 evas_object_size_hint_min_set(VIEW(item), boxw, minh);
616 evas_object_resize(VIEW(item), boxw, minh);
617 }
604} 618}
605 619
606EOLIAN static const char * 620EOLIAN static const char *