elm win - fix wrong resizing of focus highlight obj.

When focus highlight animation is enabled, focus highlight can be
resized only by animator inside edje. So, if there is no animation
by some reasons, focus highlight just keeps its original.
@fix
This commit is contained in:
WooHyun Jung 2014-03-28 14:17:02 +09:00
parent bd2d8a3cea
commit 75909f8654
3 changed files with 33 additions and 0 deletions

View File

@ -148,5 +148,10 @@ group { name: "elm/focus_highlight/top/default";
target: "sel";
after: "pulse";
}
program {
signal: "elm,state,anim,stop"; source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
}
}
}

View File

@ -57,6 +57,15 @@ _tb_sel(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
printf("tb sel %p\n", obj);
}
static void
_focus_anim_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
if (elm_check_state_get(obj))
elm_win_focus_highlight_animate_set(data, EINA_TRUE);
else
elm_win_focus_highlight_animate_set(data, EINA_FALSE);
}
void
test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -409,6 +418,23 @@ test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
}
}
}
Evas_Object *bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
elm_box_pack_end(tbx, bx);
my_show(bx);
{
Evas_Object *ck;
ck = elm_check_add(bx);
elm_object_text_set(ck, "Focus Highlight Animation Enable");
elm_box_pack_end(bx, ck);
my_show(ck);
evas_object_smart_callback_add(ck, "changed",
_focus_anim_changed,
win);
}
}
/**** focus 2 ****/

View File

@ -750,6 +750,8 @@ _elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
clip = evas_object_clip_get(target);
if (clip) evas_object_clip_set(obj, clip);
}
edje_object_signal_emit(obj, "elm,state,anim,stop", "elm");
}
static void