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:54:22 +0900
commit9eb86e231e953f63560b2f0fd0a2f6f7b9c93fca (patch)
treee15723235f88b9f757d84beeb715a0eb8126aad3
parentce37c4aee008e0f3dcfab54af08a09d91f6c5e23 (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 3ab56412e..9caa440b6 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
583 const char *label) 583 const char *label)
584{ 584{
585 const char *dest_part = NULL; 585 const char *dest_part = NULL;
586 Evas_Coord minw = -1, minh = -1, boxw;
587 ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(WIDGET(item), sd);
586 588
587 if (!part || !strcmp(part, "elm.text")) 589 if (!part || !strcmp(part, "elm.text"))
588 dest_part = "elm.btn.text"; 590 dest_part = "elm.btn.text";
@@ -590,6 +592,18 @@ _elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED
590 dest_part = part; 592 dest_part = part;
591 593
592 edje_object_part_text_escaped_set(elm_layout_edje_get(VIEW(item)), dest_part, label); 594 edje_object_part_text_escaped_set(elm_layout_edje_get(VIEW(item)), dest_part, label);
595
596 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
597 edje_object_size_min_restricted_calc
598 (elm_layout_edje_get(VIEW(item)), &minw, &minh, minw, minh);
599 evas_object_size_hint_min_set(VIEW(item), minw, minh);
600 evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
601
602 if (minw > boxw)
603 {
604 evas_object_size_hint_min_set(VIEW(item), boxw, minh);
605 evas_object_resize(VIEW(item), boxw, minh);
606 }
593} 607}
594 608
595EOLIAN static const char * 609EOLIAN static const char *