elm_multibuttonentry: fix label position and size defects

Summary:
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 to
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.

@fix

Reviewers: cedric, seoz, raster, reutskiy.v.v, Hermet

Reviewed By: Hermet

Subscribers: NikaWhite

Differential Revision: https://phab.enlightenment.org/D2416
This commit is contained in:
Vitalii Vorobiov 2015-04-27 10:47:22 +09:00 committed by ChunEon Park
parent adcfd71d70
commit 1cdbbcde90
1 changed files with 3 additions and 5 deletions

View File

@ -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);
}
else
{
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);