elm_label: Fixed to prevent slide's autostart before calling elm_label_slide_go()

Summary:
Label should not start sliding before elm_label_slide_go() is called.
However, label starts sliding automatically,
because resize callback emits slide start signal.
This patch prevents label from sliding before calling elm_label_slide_go().

@fix

Reviewers: woohyun, Hermet, seoz

Subscribers: CHAN, woohyun

Differential Revision: https://phab.enlightenment.org/D1906
This commit is contained in:
Jee-Yong Um 2015-02-04 19:26:06 +09:00 committed by Daniel Juyung Seo
parent 8ea2217bdd
commit 3e2e181bc3
2 changed files with 6 additions and 1 deletions

View File

@ -86,6 +86,8 @@ _label_slide_change(Evas_Object *obj)
ELM_LABEL_DATA_GET(obj, sd);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
if (!sd->slide_state) return;
edje_object_signal_emit(wd->resize_obj, "elm,state,slide,stop", "elm");
//doesn't support multiline slide effect
@ -578,8 +580,10 @@ _elm_label_slide_speed_get(Eo *obj EINA_UNUSED, Elm_Label_Data *sd)
}
EOLIAN static void
_elm_label_slide_go(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED)
_elm_label_slide_go(Eo *obj, Elm_Label_Data *sd)
{
if (!sd->slide_state) sd->slide_state = EINA_TRUE;
_label_slide_change(obj);
elm_layout_sizing_eval(obj);
}

View File

@ -28,6 +28,7 @@ struct _Elm_Label_Data
Eina_Bool ellipsis : 1;
Eina_Bool slide_ellipsis : 1;
Eina_Bool use_slide_speed : 1;
Eina_Bool slide_state : 1; /**< This will be marked as EINA_TRUE after elm_label_slide_go() is called. */
};
#define ELM_LABEL_DATA_GET(o, sd) \