summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2014-03-28 14:17:02 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2014-03-28 14:17:02 +0900
commit6b0619a88ae0a5efcc73164660b2ab479446aceb (patch)
tree4f159328bb1bd530cdf7714d3aa812852c4448f1
parent33d91aa9037c52081f8904c8b9e2df1fb97971a5 (diff)
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
-rw-r--r--data/themes/edc/elm/focus.edc5
-rw-r--r--src/bin/test_focus.c26
-rw-r--r--src/lib/elm_win.c2
3 files changed, 33 insertions, 0 deletions
diff --git a/data/themes/edc/elm/focus.edc b/data/themes/edc/elm/focus.edc
index 4e9563bfe..19d78cde7 100644
--- a/data/themes/edc/elm/focus.edc
+++ b/data/themes/edc/elm/focus.edc
@@ -148,5 +148,10 @@ group { name: "elm/focus_highlight/top/default";
148 target: "sel"; 148 target: "sel";
149 after: "pulse"; 149 after: "pulse";
150 } 150 }
151 program {
152 signal: "elm,state,anim,stop"; source: "elm";
153 action: STATE_SET "default" 0.0;
154 target: "base";
155 }
151 } 156 }
152} 157}
diff --git a/src/bin/test_focus.c b/src/bin/test_focus.c
index 216ad50f8..f8d60eef0 100644
--- a/src/bin/test_focus.c
+++ b/src/bin/test_focus.c
@@ -57,6 +57,15 @@ _tb_sel(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
57 printf("tb sel %p\n", obj); 57 printf("tb sel %p\n", obj);
58} 58}
59 59
60static void
61_focus_anim_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
62{
63 if (elm_check_state_get(obj))
64 elm_win_focus_highlight_animate_set(data, EINA_TRUE);
65 else
66 elm_win_focus_highlight_animate_set(data, EINA_FALSE);
67}
68
60void 69void
61test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 70test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
62{ 71{
@@ -409,6 +418,23 @@ test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
409 } 418 }
410 } 419 }
411 } 420 }
421
422 Evas_Object *bx = elm_box_add(win);
423 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
424 EVAS_HINT_EXPAND);
425 elm_box_pack_end(tbx, bx);
426 my_show(bx);
427
428 {
429 Evas_Object *ck;
430 ck = elm_check_add(bx);
431 elm_object_text_set(ck, "Focus Highlight Animation Enable");
432 elm_box_pack_end(bx, ck);
433 my_show(ck);
434 evas_object_smart_callback_add(ck, "changed",
435 _focus_anim_changed,
436 win);
437 }
412} 438}
413 439
414/**** focus 2 ****/ 440/**** focus 2 ****/
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 131e81781..6c0bf7b72 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -750,6 +750,8 @@ _elm_win_focus_highlight_simple_setup(Elm_Win_Smart_Data *sd,
750 clip = evas_object_clip_get(target); 750 clip = evas_object_clip_get(target);
751 if (clip) evas_object_clip_set(obj, clip); 751 if (clip) evas_object_clip_set(obj, clip);
752 } 752 }
753
754 edje_object_signal_emit(obj, "elm,state,anim,stop", "elm");
753} 755}
754 756
755static void 757static void