summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2016-01-28 18:12:30 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2016-01-28 18:12:30 +0900
commit9b2aa79f81b5df3859224cee671f25927b26bc4a (patch)
tree33c4cdece24c9cf0bbc08417915f5fc69a2cba5d
parentb4739f5323a973a7b752b6cd10019aeb8dd61d6e (diff)
elm_focus: fix mislocation error during continuous focus movement
Summary: When focus is moved fast and continuously, newly created animator conflicts with the animator for previous movement, so focus bounces among locations. This patch removes previous animator and move focus to the final location before creating new animator. Test Plan: elementary_test -to focus elementary_test -to genlist Reviewers: raster, jpeg, cedric, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3611
-rw-r--r--data/themes/edc/elm/focus.edc15
1 files changed, 14 insertions, 1 deletions
diff --git a/data/themes/edc/elm/focus.edc b/data/themes/edc/elm/focus.edc
index f4da05f28..c080505d2 100644
--- a/data/themes/edc/elm/focus.edc
+++ b/data/themes/edc/elm/focus.edc
@@ -5,6 +5,7 @@ group { name: "elm/focus_highlight/top/default";
5 script { 5 script {
6 public s_x, s_y, s_w, s_h; /* source */ 6 public s_x, s_y, s_w, s_h; /* source */
7 public difx, dify, difw, difh; 7 public difx, dify, difw, difh;
8 public g_anim_id;
8 9
9 public animator1(val, Float:pos) { 10 public animator1(val, Float:pos) {
10 new x, y, w, h, dx, dy, dw, dh, Float:p; 11 new x, y, w, h, dx, dy, dw, dh, Float:p;
@@ -18,6 +19,10 @@ group { name: "elm/focus_highlight/top/default";
18 dh = round(float_mul(float(get_int(difh)), p)); 19 dh = round(float_mul(float(get_int(difh)), p));
19 h = get_int(s_h) + dh; 20 h = get_int(s_h) + dh;
20 update_offset(x, y, w, h); 21 update_offset(x, y, w, h);
22
23 if (pos >= 1.0) {
24 set_int(g_anim_id, 0);
25 }
21 } 26 }
22 27
23 public update_offset(x, y, w, h) { 28 public update_offset(x, y, w, h) {
@@ -28,7 +33,14 @@ group { name: "elm/focus_highlight/top/default";
28 public message(Msg_Type:type, id, ...) { 33 public message(Msg_Type:type, id, ...) {
29 if ((type == MSG_INT_SET) && (id == 1)) { 34 if ((type == MSG_INT_SET) && (id == 1)) {
30 new x1, y1, w1, h1, x2, y2, w2, h2; 35 new x1, y1, w1, h1, x2, y2, w2, h2;
36 new anim_id;
31 37
38 anim_id = get_int(g_anim_id);
39 if (anim_id != 0) {
40 cancel_anim(anim_id);
41 animator1(1, 1.0);
42 }
43
32 x1 = getarg(2); 44 x1 = getarg(2);
33 y1 = getarg(3); 45 y1 = getarg(3);
34 w1 = getarg(4); 46 w1 = getarg(4);
@@ -53,7 +65,8 @@ group { name: "elm/focus_highlight/top/default";
53 update_offset(x1, y1, w1, h1); 65 update_offset(x1, y1, w1, h1);
54 set_state(PART:"base", "custom", 0.0); 66 set_state(PART:"base", "custom", 0.0);
55 67
56 anim(0.2, "animator1", 1); 68 anim_id = anim(0.2, "animator1", 1);
69 set_int(g_anim_id, anim_id);
57 } 70 }
58 } 71 }
59 } 72 }