summaryrefslogtreecommitdiff
path: root/data/elementary/themes/edc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--data/elementary/themes/edc/efl/tooltip.edc428
1 files changed, 422 insertions, 6 deletions
diff --git a/data/elementary/themes/edc/efl/tooltip.edc b/data/elementary/themes/edc/efl/tooltip.edc
index 204b2b4..389d389 100644
--- a/data/elementary/themes/edc/efl/tooltip.edc
+++ b/data/elementary/themes/edc/efl/tooltip.edc
@@ -1,15 +1,431 @@
1group { "efl/label/tooltip"; 1group { name: "efl/label/tooltip";
2 inherit: "elm/label/base/tooltip/default";
3 alias: "efl/label/base/tooltip"; //XXX: Remove it in EFL 2.0 2 alias: "efl/label/base/tooltip"; //XXX: Remove it in EFL 2.0
4 alias: "efl/label/base/tooltip/transparent"; 3 alias: "efl/label/base/tooltip/transparent";
4 styles {
5 style { name: "tooltip_style2";
6 base: "font="FN" font_size=10 color=#ffffff style=shadow,bottom shadow_color=#00000080 text_class=bubble";
7 tag: "br" "\n";
8 tag: "hilight" "+ font="FN" text_class=bubble";
9 tag: "b" "+ font="FN" text_class=bubble";
10 tag: "tab" "\t";
11 }
12 }
13 parts {
14 part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0;
15 scale: 1;
16 description { state: "default" 0.0;
17 text {
18 style: "tooltip_style2";
19 min: 1 1;
20 ellipsis: -1;
21 }
22 }
23 }
24 }
5} 25}
6 26
7group { "efl/tooltip"; 27group { name: "efl/tooltip";
8 inherit: "elm/tooltip/base/default"; 28 min: 30 30;
29 data.item: "pad_x" "10";
30 data.item: "pad_y" "10";
31 data.item: "pad_border_x" "1";
32 data.item: "pad_border_y" "1";
33 /* tooltip is hidden after this amount.
34 Keep in sync with hide animations */
35 data.item: "hide_timeout" "0.35";
36 // if in a window... it's transparent!
37 data.item: "transparent" "enabled";
38 images.image: "tooltip-base.png" COMP;
39 images.image: "tooltip-corner-top-left-tip.png" COMP;
40 images.image: "tooltip-corner-top-right-tip.png" COMP;
41 images.image: "tooltip-corner-bottom-left-tip.png" COMP;
42 images.image: "tooltip-corner-bottom-right-tip.png" COMP;
43 images.image: "tooltip-edge-left-tip.png" COMP;
44 images.image: "tooltip-edge-right-tip.png" COMP;
45 images.image: "tooltip-edge-bottom-tip.png" COMP;
46 images.image: "tooltip-edge-top-tip.png" COMP;
47 script {
48 hide_corners() {
49 set_state(PART:"corner-top-left", "default", 0.0);
50 set_state(PART:"corner-top-right", "default", 0.0);
51 set_state(PART:"corner-bottom-left", "default", 0.0);
52 set_state(PART:"corner-bottom-right", "default", 0.0);
53 }
54 hide_edges() {
55 set_state(PART:"clipper-edge-left", "default", 0.0);
56 set_state(PART:"clipper-edge-right", "default", 0.0);
57 set_state(PART:"clipper-edge-top", "default", 0.0);
58 set_state(PART:"clipper-edge-bottom", "default", 0.0);
59 }
60 show_corner_top_left() {
61 set_state(PART:"corner-top-left", "visible", 0.0);
62 set_state(PART:"corner-top-right", "default", 0.0);
63 set_state(PART:"corner-bottom-left", "default", 0.0);
64 set_state(PART:"corner-bottom-right", "default", 0.0);
65 hide_edges();
66 }
67 show_corner_top_right() {
68 set_state(PART:"corner-top-right", "visible", 0.0);
69 set_state(PART:"corner-top-left", "default", 0.0);
70 set_state(PART:"corner-bottom-left", "default", 0.0);
71 set_state(PART:"corner-bottom-right", "default", 0.0);
72 hide_edges();
73 }
74 show_corner_bottom_left() {
75 set_state(PART:"corner-bottom-left", "visible", 0.0);
76 set_state(PART:"corner-bottom-right", "default", 0.0);
77 set_state(PART:"corner-top-left", "default", 0.0);
78 set_state(PART:"corner-top-right", "default", 0.0);
79 hide_edges();
80 }
81 show_corner_bottom_right() {
82 set_state(PART:"corner-bottom-right", "visible", 0.0);
83 set_state(PART:"corner-bottom-left", "default", 0.0);
84 set_state(PART:"corner-top-left", "default", 0.0);
85 set_state(PART:"corner-top-right", "default", 0.0);
86 hide_edges();
87 }
88 show_edge_left(Float:val) {
89 set_state(PART:"clipper-edge-left", "visible", 0.0);
90 set_drag(PART:"edge-drag-left", 0.0, val);
91 set_state(PART:"clipper-edge-right", "default", 0.0);
92 set_state(PART:"clipper-edge-top", "default", 0.0);
93 set_state(PART:"clipper-edge-bottom", "default", 0.0);
94 hide_corners();
95 }
96 show_edge_right(Float:val) {
97 set_state(PART:"clipper-edge-right", "visible", 0.0);
98 set_drag(PART:"edge-drag-right", 0.0, val);
99 set_state(PART:"clipper-edge-left", "default", 0.0);
100 set_state(PART:"clipper-edge-top", "default", 0.0);
101 set_state(PART:"clipper-edge-bottom", "default", 0.0);
102 hide_corners();
103 }
104 show_edge_top(Float:val) {
105 set_state(PART:"clipper-edge-top", "visible", 0.0);
106 set_drag(PART:"edge-drag-top", val, 0.0);
107 set_state(PART:"clipper-edge-bottom", "default", 0.0);
108 set_state(PART:"clipper-edge-left", "default", 0.0);
109 set_state(PART:"clipper-edge-right", "default", 0.0);
110 hide_corners();
111 }
112 show_edge_bottom(Float:val) {
113 set_state(PART:"clipper-edge-bottom", "visible", 0.0);
114 set_drag(PART:"edge-drag-bottom", val, 0.0);
115 set_state(PART:"clipper-edge-top", "default", 0.0);
116 set_state(PART:"clipper-edge-left", "default", 0.0);
117 set_state(PART:"clipper-edge-right", "default", 0.0);
118 hide_corners();
119 }
120 public message(Msg_Type:type, id, ...) {
121 if ((type == MSG_FLOAT_SET) && (id == 1)) {
122 new Float:x, Float:y;
123
124 x = getfarg(2);
125 y = getfarg(3);
126
127 if (x < 0.0) {
128 if (y < 0.0) show_corner_top_left();
129 else if (y > 1.0) show_corner_bottom_left();
130 else show_edge_left(y);
131 } else if (x > 1.0) {
132 if (y < 0.0) show_corner_top_right();
133 else if (y > 1.0) show_corner_bottom_right();
134 else show_edge_right(y);
135 } else {
136 if (y < 0.0) show_edge_top(x);
137 else if (y > 1.0) show_edge_bottom(x);
138 else {
139 hide_corners();
140 hide_edges();
141 }
142 }
143 }
144 }
145 }
146 parts {
147 part { name: "clipper"; type: RECT;
148 description { state: "default" 0.0;
149 color: 255 255 255 0;
150 rel1 { to: "pop"; offset: -5 -5; }
151 rel2 { to: "pop"; offset: 5 5; }
152 }
153 description { state: "visible" 0.0;
154 inherit: "default" 0.0;
155 color: 255 255 255 255;
156 }
157 }
158 part { name: "pop"; mouse_events: 0;
159 clip_to: "clipper";
160 scale: 1;
161 description { state: "default" 0.0;
162 min: 30 30;
163 rel1 {
164 to: "elm.swallow.content";
165 offset: -5 -4;
166 }
167 rel2 {
168 to: "elm.swallow.content";
169 offset: 4 5;
170 }
171 image {
172 normal: "tooltip-base.png";
173 border: 7 7 6 8;
174 }
175 image.middle: SOLID;
176 }
177 }
178 #define TT_CORNER(name_, rx, ry, ax, ay, ox, oy) \
179 part { name: "corner-"name_; mouse_events: 0; \
180 clip_to: "clipper"; \
181 scale: 1; \
182 description { state: "default" 0.0; \
183 visible: 0; \
184 align: ax ay; \
185 FIXED_SIZE(12, 12) \
186 rel1 { \
187 relative: rx ry; \
188 offset: ox oy; \
189 to: "pop"; \
190 } \
191 rel2 { \
192 relative: rx ry; \
193 offset: ox oy; \
194 to: "pop"; \
195 } \
196 image.normal: "tooltip-corner-"name_"-tip.png"; \
197 } \
198 description { state: "visible" 0.0; \
199 inherit: "default" 0.0; \
200 visible: 1; \
201 } \
202 }
203 TT_CORNER("top-left", 0, 0, 0, 0, -4, -5);
204 TT_CORNER("top-right", 1, 0, 1, 0, 3, -5);
205 TT_CORNER("bottom-left", 0, 1, 0, 1, -4, 2);
206 TT_CORNER("bottom-right", 1, 1, 1, 1, 3, 2);
207 #undef TT_CORNER
208
209 #define TT_EDGE_VERT(name_, rx, ax, ox) \
210 part { name: "clipper-edge-"name_; type: RECT; \
211 clip_to: "clipper"; \
212 description { state: "default" 0.0; \
213 visible: 0; \
214 min: 9 13; \
215 align: ax 0.5; \
216 fixed: 1 1; \
217 rel1 { \
218 relative: rx 0.0; \
219 offset: ox 0; \
220 to: "elm.swallow.content"; \
221 } \
222 rel2 { \
223 relative: rx 1.0; \
224 offset: ox 0; \
225 to: "elm.swallow.content"; \
226 } \
227 } \
228 description { state: "visible" 0.0; \
229 inherit: "default" 0.0; \
230 visible: 1; \
231 } \
232 } \
233 part { name: "edge-area-"name_; type: RECT; mouse_events: 0; \
234 clip_to: "clipper-edge-"name_; \
235 scale: 1; \
236 description { state: "default" 0.0; \
237 color: 0 0 0 0; \
238 min: 9 13; \
239 align: ax 0.5; \
240 fixed: 1 1; \
241 rel1 { \
242 relative: rx 0.0; \
243 offset: ox 0; \
244 to: "elm.swallow.content"; \
245 } \
246 rel2 { \
247 relative: rx 1.0; \
248 offset: ox 0; \
249 to: "elm.swallow.content"; \
250 } \
251 } \
252 } \
253 part { name: "edge-drag-"name_; type: RECT; mouse_events: 0; \
254 clip_to: "clipper-edge-"name_; \
255 scale: 1; \
256 dragable { \
257 x: 0 0 0; \
258 y: 1 1 0; \
259 confine: "edge-area-"name_; \
260 } \
261 description { state: "default" 0.0; \
262 color: 0 0 0 0; \
263 min: 9 13; \
264 rel1.to: "edge-area-"name_; \
265 rel2.to: "edge-area-"name_; \
266 } \
267 } \
268 part { name: "edge-img-"name_; mouse_events: 0; \
269 clip_to: "clipper-edge-"name_; \
270 description { state: "default" 0.0; \
271 FIXED_SIZE(9, 13) \
272 align: ax 0.5; \
273 rel1.to: "edge-drag-"name_; \
274 rel2.to: "edge-drag-"name_; \
275 image.normal: "tooltip-edge-"name_"-tip.png"; \
276 } \
277 }
278 TT_EDGE_VERT("left", 0, 1, -3);
279 TT_EDGE_VERT("right", 1, 0, 2);
280 #undef TT_EDGE_VERT
281
282 #define TT_EDGE_HORIZ(name_, ry, ay, oy) \
283 part { name: "clipper-edge-"name_; type: RECT; \
284 clip_to: "clipper"; \
285 scale: 1; \
286 description { state: "default" 0.0; \
287 visible: 0; \
288 min: 11 9; \
289 align: 0.5 ay; \
290 fixed: 1 1; \
291 rel1 { \
292 relative: 0.0 ry; \
293 offset: 0 oy; \
294 to: "elm.swallow.content"; \
295 } \
296 rel2 { \
297 relative: 1.0 ry; \
298 offset: 0 oy; \
299 to: "elm.swallow.content"; \
300 } \
301 } \
302 description { state: "visible" 0.0; \
303 inherit: "default" 0.0; \
304 visible: 1; \
305 } \
306 } \
307 part { name: "edge-area-"name_; type: RECT; mouse_events: 0; \
308 clip_to: "clipper-edge-"name_; \
309 scale: 1; \
310 description { state: "default" 0.0; \
311 color: 0 0 0 0; \
312 min: 11 9; \
313 align: 0.5 ay; \
314 fixed: 1 1; \
315 rel1.to: "clipper-edge-"name_; \
316 rel2.to: "clipper-edge-"name_; \
317 } \
318 } \
319 part { name: "edge-drag-"name_; type: RECT; mouse_events: 0; \
320 clip_to: "clipper-edge-"name_; \
321 scale: 1; \
322 dragable { \
323 x: 1 1 0; \
324 y: 0 0 0; \
325 confine: "edge-area-"name_; \
326 } \
327 description { state: "default" 0.0; \
328 color: 0 0 0 0; \
329 min: 11 9; \
330 rel1.to: "edge-area-"name_; \
331 rel2.to: "edge-area-"name_; \
332 } \
333 } \
334 part { name: "edge-img-"name_; mouse_events: 0; \
335 clip_to: "clipper-edge-"name_; \
336 scale: 1; \
337 description { state: "default" 0.0; \
338 FIXED_SIZE(11, 9) \
339 align: 0.5 ay; \
340 rel1.to: "edge-drag-"name_; \
341 rel2.to: "edge-drag-"name_; \
342 image.normal: "tooltip-edge-"name_"-tip.png"; \
343 } \
344 }
345 TT_EDGE_HORIZ("top", 0, 1, -1);
346 TT_EDGE_HORIZ("bottom", 1, 0, 1);
347 #undef TT_EDGE_HORIZ
348 part { name: "clipper_content"; type: RECT;
349 description { state: "default" 0.0;
350 color: 255 255 255 0;
351 rel1.to: "elm.swallow.content";
352 rel2.to: "elm.swallow.content";
353 }
354 description { state: "visible" 0.0;
355 inherit: "default" 0.0;
356 color: 255 255 255 255;
357 }
358 }
359 part { name: "elm.swallow.content"; type: SWALLOW;
360 clip_to: "clipper_content";
361 description { state: "default" 0.0;
362 rel1.offset: 10 10;
363 rel2.offset: -11 -11;
364 }
365 }
366 programs {
367 program { name: "show0";
368 signal: "elm,action,show"; source: "elm";
369 action: ACTION_STOP;
370 target: "hide0";
371 target: "hide1";
372 target: "hide2";
373 target: "hide3";
374 after: "show1";
375 after: "show2";
376 }
377 program { name: "show1";
378 action: STATE_SET "visible" 0.0;
379 transition: LINEAR 0.15;
380 target: "clipper";
381 }
382 program { name: "show2";
383 in: 0.1 0.0;
384 action: STATE_SET "visible" 0.0;
385 transition: LINEAR 0.15;
386 target: "clipper_content";
387 }
388 program { name: "hide0";
389 signal: "elm,action,hide"; source: "elm";
390 action: ACTION_STOP;
391 target: "show0";
392 target: "show1";
393 target: "show2";
394 after: "hide1";
395 after: "hide2";
396 after: "hide3";
397 }
398 program { name: "hide1";
399 script {
400 hide_corners();
401 hide_edges();
402 }
403 }
404 program { name: "hide2";
405 action: STATE_SET "default" 0.0;
406 transition: LINEAR 0.1;
407 target: "clipper_content";
408 }
409 program { name: "hide3";
410 in: 0.1 0.0;
411 action: STATE_SET "default" 0.0;
412 transition: LINEAR 0.1;
413 target: "clipper";
414 }
415 }
416 }
9} 417}
10 418
11group { "efl/tooltip:transparent"; 419group { name: "efl/tooltip:transparent";
12 inherit: "elm/tooltip/base/transparent"; 420 data.item: "pad_x" "10";
421 data.item: "pad_y" "10";
422 data.item: "transparent" "enabled";
423 parts {
424 part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
425 scale: 1;
426 description { state: "default" 0.0; }
427 }
428 }
13} 429}
14 430
15/////////////////////////////////////////////////////////////////////////////// 431///////////////////////////////////////////////////////////////////////////////