summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2018-04-11 17:46:37 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2018-04-11 20:00:21 +0900
commit5cf383ee5addab4dc8b65c2bf2aa675c89e94d1b (patch)
tree784dd8693d3b7e181c814a26d8d34fa7484ac27f
parentc7cd5c0a14b66e91c3176ce262cabfccbdbbafef (diff)
theme: focus - remove elm focus highlight inheritance.
-rw-r--r--data/elementary/themes/edc/efl/focus.edc178
1 files changed, 174 insertions, 4 deletions
diff --git a/data/elementary/themes/edc/efl/focus.edc b/data/elementary/themes/edc/efl/focus.edc
index d7c3b78f19..426f869399 100644
--- a/data/elementary/themes/edc/efl/focus.edc
+++ b/data/elementary/themes/edc/efl/focus.edc
@@ -1,7 +1,177 @@
1group { "efl/focus_highlight/top"; 1group { name: "efl/focus_highlight/top";
2 inherit: "elm/focus_highlight/top/default"; 2 images.image: "box_glow.png" COMP;
3 images.image: "box_outline.png" COMP;
4 data.item: "animate" "on";
5 script {
6 public s_x, s_y, s_w, s_h; /* source */
7 public difx, dify, difw, difh;
8 public g_anim_id;
9
10 public animator1(val, Float:pos) {
11 new x, y, w, h, dx, dy, dw, dh, Float:p;
12 p = 1.0 - ((1.0 - pos) * (1.0 - pos) * (1.0 - pos));
13 dx = round(float_mul(float(get_int(difx)), p));
14 x = get_int(s_x) + dx;
15 dy = round(float_mul(float(get_int(dify)), p));
16 y = get_int(s_y) + dy;
17 dw = round(float_mul(float(get_int(difw)), p));
18 w = get_int(s_w) + dw;
19 dh = round(float_mul(float(get_int(difh)), p));
20 h = get_int(s_h) + dh;
21 update_offset(x, y, w, h);
22
23 if (pos >= 1.0) {
24 set_int(g_anim_id, 0);
25 }
26 }
27
28 public update_offset(x, y, w, h) {
29 set_state_val(PART:"base", STATE_REL1_OFFSET, x, y);
30 set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h);
31 }
32
33 public message(Msg_Type:type, id, ...) {
34 if ((type == MSG_INT_SET) && (id == 1)) {
35 new x1, y1, w1, h1, x2, y2, w2, h2;
36 new anim_id;
37
38 anim_id = get_int(g_anim_id);
39 if (anim_id != 0) {
40 cancel_anim(anim_id);
41 }
42
43 x1 = getarg(2);
44 y1 = getarg(3);
45 w1 = getarg(4);
46 h1 = getarg(5);
47 x2 = getarg(6);
48 y2 = getarg(7);
49 w2 = getarg(8);
50 h2 = getarg(9);
51
52 set_int(s_x, x1);
53 set_int(s_y, y1);
54 set_int(s_w, w1);
55 set_int(s_h, h1);
56 set_int(difx, x2 - x1);
57 set_int(dify, y2 - y1);
58 set_int(difw, w2 - w1);
59 set_int(difh, h2 - h1);
60
61 custom_state(PART:"base", "default", 0.0);
62 set_state_val(PART:"base", STATE_REL1, 0.0, 0.0);
63 set_state_val(PART:"base", STATE_REL2, 0.0, 0.0);
64 update_offset(x1, y1, w1, h1);
65 set_state(PART:"base", "custom", 0.0);
66
67 anim_id = anim(0.2, "animator1", 1);
68 set_int(g_anim_id, anim_id);
69 }
70 }
71 }
72 parts {
73 part { name: "base"; type: SPACER;
74 description { state: "default" 0.0;
75 fixed: 1 1;
76 }
77 }
78 part { name: "clip"; type: RECT;
79 description { state: "default" 0.0;
80 rel1.to: "glow";
81 rel2.to: "glow";
82 color: 255 255 255 0;
83 }
84 description { state: "visible" 0.0;
85 inherit: "default" 0.0;
86 color: 255 255 255 255;
87 }
88 }
89 part { name: "glow"; mouse_events: 0;
90 clip_to: "clip";
91 description { state: "default" 0.0;
92 image.normal: "box_glow.png";
93 image.border: 12 12 12 12;
94 image.middle: 0;
95 fill.smooth: 0;
96 rel1.to: "base";
97 rel1.offset: -7 -7;
98 rel2.to: "base";
99 rel2.offset: 5 5;
100 }
101 }
102 part { name: "sel"; mouse_events: 0;
103 clip_to: "clip";
104 description { state: "default" 0.0;
105 image.normal: "box_outline.png";
106 image.border: 12 12 12 12;
107 image.middle: 0;
108 fill.smooth: 0;
109 rel1.to: "glow";
110 rel2.to: "glow";
111 color: 255 255 255 0;
112 }
113 description { state: "hi" 0.0;
114 inherit: "default" 0.0;
115 color: 255 255 255 255;
116 }
117 }
118 }
119 programs {
120 program {
121 signal: "elm,action,focus,show"; source: "elm";
122 action: ACTION_STOP;
123 target: "pulse";
124 target: "pulse2";
125 after: "go2";
126 }
127 program { name: "go2";
128 action: STATE_SET "visible" 0.0;
129 transition: DECELERATE 0.2;
130 target: "clip";
131 after: "pulse";
132 after: "go3";
133 }
134 program { name: "go3";
135 action: SIGNAL_EMIT "elm,action,focus,show,end" "elm";
136 }
137 program {
138 signal: "elm,action,focus,hide"; source: "elm";
139 action: STATE_SET "default" 0.0;
140 transition: DECELERATE 0.4;
141 target: "clip";
142 after: "stop2";
143 }
144 program { name: "stop2";
145 action: SIGNAL_EMIT "elm,action,focus,hide,end" "elm";
146 after: "stop3";
147 }
148 program { name: "stop3";
149 action: ACTION_STOP;
150 target: "pulse";
151 target: "pulse2";
152 }
153 program { name: "pulse";
154 action: STATE_SET "hi" 0.0;
155 transition: SINUSOIDAL 0.2;
156 in: 3.0 0.0;
157 target: "sel";
158 after: "pulse2";
159 }
160 program { name: "pulse2";
161 action: STATE_SET "default" 0.0;
162 transition: SINUSOIDAL 0.4;
163 target: "sel";
164 after: "pulse";
165 }
166 program {
167 signal: "elm,state,anim,stop"; source: "elm";
168 action: STATE_SET "default" 0.0;
169 target: "base";
170 }
171 }
3} 172}
4 173
5group { "efl/focus_highlight/top:blank"; 174group { name: "efl/focus_highlight/top:blank";
6 inherit: "elm/focus_highlight/top/blank"; 175 parts {
176 }
7} 177}