elementary/label - recover ellipsis mode when slide mode is end.

SVN revision: 82315
This commit is contained in:
ChunEon Park 2013-01-07 04:33:29 +00:00
parent 13d9833110
commit 1b2897fa18
2 changed files with 34 additions and 14 deletions

View File

@ -136,7 +136,7 @@ group { name: "elm/label/base/slide_long";
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
min: 0 1;
}
}
description { state: "slide_end" 0.0;
@ -144,12 +144,20 @@ group { name: "elm/label/base/slide_long";
rel1.relative: 0.0 0.0;
rel2.relative: 0.0 1.0;
align: 1.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
description { state: "slide_begin" 0.0;
inherit: "default" 0.0;
rel1.relative: 1.0 0.0;
rel2.relative: 1.0 1.0;
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
}
}
@ -252,7 +260,7 @@ group { name: "elm/label/base/slide_short";
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
min: 0 1;
}
}
description { state: "slide_end" 0.0;
@ -260,12 +268,20 @@ group { name: "elm/label/base/slide_short";
rel1.relative: 1.0 0.0;
rel2.relative: 1.0 1.0;
align: 1.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
description { state: "slide_begin" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 0.0 1.0;
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
}
}
@ -379,7 +395,7 @@ group { name: "elm/label/base/slide_bounce";
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
min: 0 1;
}
}
description { state: "slide_end" 0.0;
@ -387,12 +403,20 @@ group { name: "elm/label/base/slide_bounce";
rel1.relative: 1.0 0.0;
rel2.relative: 1.0 1.0;
align: 1.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
description { state: "slide_begin" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 0.0 1.0;
align: 0.0 0.0;
text {
style: "textblock_style";
min: 1 1;
}
}
}
}

View File

@ -83,7 +83,6 @@ _label_slide_change(Evas_Object *obj)
//doesn't support multiline slide effect
if (sd->linewrap)
{
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
WRN("Doesn't support slide effect for multiline! : label=%p", obj);
return;
}
@ -96,11 +95,7 @@ _label_slide_change(Evas_Object *obj)
plainlen = strlen(plaintxt);
free(plaintxt);
}
if (plainlen < 1)
{
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
return;
}
if (plainlen < 1) return;
//has slide effect.
if (sd->slide_mode != ELM_LABEL_SLIDE_MODE_NONE)
@ -117,11 +112,7 @@ _label_slide_change(Evas_Object *obj)
evas_object_textblock_size_formatted_get(tb, &tb_w, NULL);
evas_object_geometry_get(wd->resize_obj,
NULL, NULL, &w, NULL);
if ((tb_w > 0) && (tb_w < w))
{
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
return;
}
if ((tb_w > 0) && (tb_w < w)) return;
}
}
Edje_Message_Float_Set *msg =
@ -363,6 +354,11 @@ static void
_on_slide_end(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__, const char *source __UNUSED__)
{
ELM_LABEL_DATA_GET(data, sd);
if (sd->slide_ellipsis)
eo_do(data, elm_obj_label_ellipsis_set(EINA_TRUE));
evas_object_smart_callback_call(data, SIG_SLIDE_END, NULL);
}