summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2014-11-10 14:06:32 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-10 14:06:32 +0900
commit40cd308c019409baae50e00fba39150c7656d9a3 (patch)
treebf33bdd6b6f516ef4533644c1ec8830ea938a900 /src/lib
parent2af33f20ed2fa9cdadf077c2161ae39e01739872 (diff)
label: Reset sd->lastw as '-1' in some elm_label APIs for ensure the sizing_eval.
Summary: In some cases, elm_label doesn't calculate its min size if it is not resized from outside. It is happened when only elm_label used with elm_label_line_wrap_set API. The following APIs can change min size of the widget, so we can't skip the sizing_eval func. elm_label_line_wrap_set elm_label_line_width_set elm_object_text_set -> _elm_label_elm_layout_text_set will be called. @fix Test Plan: I put a change to test_notify.c for test. elementary_test notify -> click "top" button. -> You can't see elm_label without the patch. Reviewers: woohyun, tasn, seoz Reviewed By: seoz Subscribers: herdsman Differential Revision: https://phab.enlightenment.org/D1652
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_label.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 24c6474dd..505b71770 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -330,7 +330,7 @@ _elm_label_elm_layout_text_set(Eo *obj, Elm_Label_Data *sd, const char *part, co
330 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_layout_text_set(part, label)); 330 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_layout_text_set(part, label));
331 if (int_ret) 331 if (int_ret)
332 { 332 {
333 sd->lastw = 0; 333 sd->lastw = -1;
334 eo_do(obj, elm_obj_layout_sizing_eval()); 334 eo_do(obj, elm_obj_layout_sizing_eval());
335 } 335 }
336 return int_ret; 336 return int_ret;
@@ -453,6 +453,7 @@ _elm_label_line_wrap_set(Eo *obj, Elm_Label_Data *sd, Elm_Wrap_Type wrap)
453 453
454 if (_stringshare_key_value_replace(&sd->format, "wrap", wrap_str, 0) == 0) 454 if (_stringshare_key_value_replace(&sd->format, "wrap", wrap_str, 0) == 0)
455 { 455 {
456 sd->lastw = -1;
456 _label_format_set(wd->resize_obj, sd->format); 457 _label_format_set(wd->resize_obj, sd->format);
457 elm_layout_sizing_eval(obj); 458 elm_layout_sizing_eval(obj);
458 } 459 }
@@ -476,6 +477,7 @@ _elm_label_wrap_width_set(Eo *obj, Elm_Label_Data *sd, Evas_Coord w)
476 if (sd->ellipsis) 477 if (sd->ellipsis)
477 _label_format_set(wd->resize_obj, sd->format); 478 _label_format_set(wd->resize_obj, sd->format);
478 sd->wrap_w = w; 479 sd->wrap_w = w;
480 sd->lastw = -1;
479 481
480 elm_layout_sizing_eval(obj); 482 elm_layout_sizing_eval(obj);
481} 483}