hermet pushed a commit to branch master.


commit 79fb192b50d1891950428b1ecd31bedbcbbcf506
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Mon Apr 27 10:47:22 2015 +0900

    elm_multibuttonentry: fix label position and size defects
    1.) Fixing defective label position.
    Whenever user create multibuttonentry and set some text into label,
    label will be shown at zero point (0,0) of MultiButtonEntry parent.
    But then, after clicking on any button of MBE object, label position forced 
    be recalculated and changes it's position.
    2.) Fixing wrong size when label is not used.
    When label is not being used, buttons shift by few pixels,
    and it looks like if label is actually there, which is wrong.
    Reviewers: cedric, seoz, raster, reutskiy.v.v, Hermet
    Reviewed By: Hermet
    Subscribers: NikaWhite
    Differential Revision: https://phab.enlightenment.org/D2416
 src/lib/elc_multibuttonentry.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 1300c8b..33fdb9f 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -291,11 +291,7 @@ _view_update(Elm_Multibuttonentry_Data *sd)
    // update label
    if (sd->label)
-     {
-        elm_box_unpack(sd->box, sd->label);
-        elm_box_pack_start(sd->box, sd->label);
-        evas_object_size_hint_min_get(sd->label, &width, &height);
-     }
+     evas_object_size_hint_min_get(sd->label, &width, &height);
    if (sd->guide_text)
@@ -1155,11 +1151,13 @@ _label_set(Evas_Object *obj,
         edje_object_signal_emit(sd->label, "elm,mbe,clear_text", "elm");
         edje_object_size_min_calc(sd->label, &width, &height);
+        elm_box_unpack(sd->box, sd->label);
         edje_object_signal_emit(sd->label, "elm,mbe,set_text", "elm");
         edje_object_size_min_calc(sd->label, &width, &height);
+        elm_box_pack_start(sd->box, sd->label);
    elm_coords_finger_size_adjust(1, &width, 1, &height);


Reply via email to