summaryrefslogtreecommitdiff
path: root/data/elementary/themes/edc/efl/calendar.edc
diff options
context:
space:
mode:
Diffstat (limited to 'data/elementary/themes/edc/efl/calendar.edc')
-rw-r--r--data/elementary/themes/edc/efl/calendar.edc551
1 files changed, 551 insertions, 0 deletions
diff --git a/data/elementary/themes/edc/efl/calendar.edc b/data/elementary/themes/edc/efl/calendar.edc
new file mode 100644
index 0000000..86aee2c
--- /dev/null
+++ b/data/elementary/themes/edc/efl/calendar.edc
@@ -0,0 +1,551 @@
1#define CIT_STYLE\
2 style { name: "efl_ui_calendar_date_style";\
3 base: "font="FN" font_size=10 color=#ffffff style=shadow,bottom shadow_color=#00000080 align=center text_class=calendar_day_text color_class=calendar_day_text";\
4 }\
5 style { name: "efl_ui_calendar_date_today_style";\
6 base: "font="FN" font_size=10 color=#3399ff style=glow glow_color=#3399ff18 align=center text_class=calendar_day_text_today color_class=calendar_day_text_today";\
7 }\
8 style { name: "efl_ui_calendar_date_disabled_style";\
9 base: "font="FN" font_size=10 color=#151515 style=shadow,bottom shadow_color=#ffffffc0 align=center text_class=calendar_day_text_disabled text_class=calendar_day_text_disabled";\
10 }\
11
12#define CAL_SPIN(_sufix, _text, _relative)\
13 part { name: "left_bt"#_sufix; type: SPACER;\
14 scale: 1;\
15 description { state: "default" 0.0;\
16 fixed: 1 1;\
17 rel1 { to: #_relative;\
18 offset: 0 0;\
19 }\
20 rel2 { to: #_relative;\
21 offset: 0 -1;\
22 }\
23 align: 0.0 0.5;\
24 min: 15 15;\
25 max: 15 15;\
26 }\
27 }\
28 part { name: "right_bt"#_sufix; type: RECT;\
29 scale: 1;\
30 description { state: "default" 0.0;\
31 fixed: 1 1;\
32 rel1 { to: #_relative;\
33 offset: -1 0;\
34 }\
35 rel2 { to: #_relative;\
36 offset: -1 -1;\
37 }\
38 align: 1.0 0.5;\
39 min: 15 15;\
40 max: 15 15;\
41 color: 0 0 0 0;\
42 }\
43 }\
44 part { name: "elm,calendar,button"#_sufix",left";\
45 type: SWALLOW;\
46 scale: 1;\
47 description { state: "default" 0.0;\
48 fixed: 1 1;\
49 rel1.to: "left_bt"#_sufix;\
50 rel2.to: "left_bt"#_sufix;\
51 }\
52 description { state: "rtl" 0.0;\
53 inherit: "default" 0.0;\
54 rel1.to: "right_bt"#_sufix;\
55 rel2.to: "right_bt"#_sufix;\
56 }\
57 }\
58 part { name: "elm,calendar,button"#_sufix",right";\
59 type: SWALLOW;\
60 scale: 1;\
61 description { state: "default" 0.0;\
62 fixed: 1 1;\
63 rel1.to: "right_bt"#_sufix;\
64 rel2.to: "right_bt"#_sufix;\
65 }\
66 description { state: "rtl" 0.0;\
67 inherit: "default" 0.0;\
68 rel1.to: "left_bt"#_sufix;\
69 rel2.to: "left_bt"#_sufix;\
70 }\
71 }\
72 part { name: #_text; type: TEXT; mouse_events: 0;\
73 effect: SHADOW BOTTOM; \
74 scale: 1;\
75 description { state: "default" 0.0;\
76 fixed: 1 1;\
77 rel1 { relative: 1.0 0.0;\
78 to: "left_bt"#_sufix;\
79 }\
80 rel2 { relative: 0.0 1.0;\
81 to: "right_bt"#_sufix;\
82 }\
83 text { font: FNBD; size: 10;\
84 min: 0 1;\
85 text_class: "calendar_"#_text; \
86 }\
87 color_class: "calendar_"#_text; \
88 }\
89 }
90
91#define CH(_pos) \
92 part { name: "ch_"#_pos".base"; type: SPACER; \
93 description { state: "default" 0.0; \
94 rel1 { \
95 relative: (_pos % 7 / 7) 0.0; \
96 to: "header"; \
97 } \
98 rel2 { \
99 relative: (_pos % 7 / 7 + 1 / 7) 1.0; \
100 to: "header"; \
101 } \
102 } \
103 } \
104 part { name: "ch_"#_pos".text"; type: TEXT; mouse_events: 0; \
105 effect: SHADOW BOTTOM; \
106 scale: 1; \
107 clip_to: "ch_"#_pos".clipper"; \
108 description { state: "default" 0.0; \
109 rel1.to: "ch_"#_pos".base"; \
110 rel2.to: "ch_"#_pos".base"; \
111 text { font: FN; size: 8; \
112 min: 1 1; \
113 ellipsis: -1; \
114 text_class: "calendar_weekday_text"; \
115 } \
116 color_class: "calendar_weekday_text"; \
117 } \
118 } \
119 part { name: "ch_"#_pos".clipper"; type: RECT; \
120 description { state: "default" 0.0; \
121 rel1.to: "ch_"#_pos".base"; \
122 rel2.to: "ch_"#_pos".base"; \
123 } \
124 }
125
126#define CIT(_pos) \
127 part { name: "cit_"#_pos".rect"; type: SPACER; \
128 description { state: "default" 0.0; \
129 rel1 { \
130 relative: (_pos % 7 / 7) \
131 (_pos / 7 / 6 - _pos % 7 / 7 / 6); \
132 to: "base"; \
133 } \
134 rel2 { \
135 relative: (_pos % 7 / 7 + 1 / 7) \
136 (_pos / 7 / 6 + 1 / 6 - _pos % 7 / 7 / 6); \
137 to: "base"; \
138 } \
139 } \
140 } \
141 part { name: "cit_"#_pos".event"; type: RECT; repeat_events: 1; \
142 description { state: "default" 0.0; \
143 rel1.to: "cit_"#_pos".rect"; \
144 rel2.to: "cit_"#_pos".rect"; \
145 color: 0 0 0 0; \
146 } \
147 } \
148 part { name: "cit_"#_pos".pat"; mouse_events: 0; \
149 description { state: "default" 0.0; \
150 rel1.to: "cit_"#_pos".selected"; \
151 rel1.offset: 1 1; \
152 rel2.to: "cit_"#_pos".selected"; \
153 rel2.offset: -2 -2; \
154 image.normal: "diagonal_stripes.png"; \
155 color: 255 255 255 25; \
156 TILED_PATTERN(240, 240) \
157 color_class: "calendar_day_selected"; \
158 visible: 0; \
159 } \
160 description { state: "selected" 0.0; \
161 inherit: "default" 0.0; \
162 visible: 1; \
163 } \
164 } \
165 part { name: "cit_"#_pos".selected"; mouse_events: 0; \
166 description { state: "default" 0.0; \
167 rel1.to: "cit_"#_pos".rect"; \
168 rel2.to: "cit_"#_pos".rect"; \
169 image.normal: "outline_glow.png"; \
170 image.border: 4 4 4 4; \
171 color_class: "calendar_day_selected"; \
172 visible: 0; \
173 } \
174 description { state: "selected" 0.0; \
175 inherit: "default" 0.0; \
176 visible: 1; \
177 } \
178 } \
179 part { name: "cit_"#_pos".selected2"; mouse_events: 0; \
180 description { state: "default" 0.0; \
181 rel1.to: "cit_"#_pos".rect"; \
182 rel2.to: "cit_"#_pos".rect"; \
183 image.normal: "outline_glow.png"; \
184 image.border: 4 4 4 4; \
185 color: 255 255 255 128; \
186 color_class: "calendar_day_highlighted"; \
187 visible: 0; \
188 } \
189 description { state: "highlighted" 0.0; \
190 inherit: "default" 0.0; \
191 visible: 1; \
192 } \
193 } \
194 part { name: "cit_"#_pos".glow"; mouse_events: 0; \
195 description { state: "default" 0.0; \
196 rel1.to: "cit_"#_pos".rect"; \
197 rel2.to: "cit_"#_pos".rect"; \
198 image.normal: "box_glow.png"; \
199 image.border: 12 12 12 12; \
200 image.middle: 0; \
201 fill.smooth: 0; \
202 visible: 0; \
203 } \
204 description { state: "focused" 0.0; \
205 inherit: "default" 0.0; \
206 visible: 1; \
207 } \
208 } \
209 part { name: "cit_"#_pos".text"; type: TEXTBLOCK; mouse_events: 0; \
210 scale: 1; \
211 description { state: "default" 0.0; \
212 rel1.to: "cit_"#_pos".rect"; \
213 rel2.to: "cit_"#_pos".rect"; \
214 text.style: "efl_ui_calendar_date_style"; \
215 text.min: 1 1; \
216 text.ellipsis: -1; \
217 } \
218 description { state: "today" 0.0; \
219 inherit: "default" 0.0; \
220 text.style: "efl_ui_calendar_date_today_style"; \
221 } \
222 description { state: "disabled" 0.0; \
223 inherit: "default" 0.0; \
224 text.style: "efl_ui_calendar_date_disabled_style"; \
225 } \
226 } \
227 part { name: "cit_"#_pos".check"; mouse_events: 0; \
228 scale: 1; \
229 description { state: "default" 0.0; \
230 fixed: 1 1; \
231 rel1 { \
232 to: "cit_"#_pos".rect"; \
233 relative: 0.6 0.5; \
234 } \
235 rel2 { \
236 to: "cit_"#_pos".rect"; \
237 relative: 0.6 0.5; \
238 } \
239 min: 16 16; \
240 max: 16 16; \
241 aspect: 1 1; \
242 align: 0.0 1.0;\
243 image.normal: "icon_border_remember.png"; \
244 color_class: "calendar_day_checked"; \
245 visible: 0; \
246 } \
247 description { state: "visible" 0.0; \
248 inherit: "default" 0.0; \
249 visible: 1; \
250 } \
251 } \
252 part { name: "cit_"#_pos".access"; type: RECT; repeat_events: 1; \
253 description { state: "default" 0.0; \
254 rel1.to: "cit_"#_pos".event"; \
255 rel2.to: "cit_"#_pos".event"; \
256 color: 0 0 0 0; \
257 } \
258 } \
259 programs { \
260 program { \
261 name: "cit_"#_pos".go_active"; \
262 signal: "cit_"#_pos",selected"; \
263 source: "elm"; \
264 action: STATE_SET "selected" 0.0; \
265 target: "cit_"#_pos".pat"; \
266 target: "cit_"#_pos".selected"; \
267 } \
268 program { \
269 name: "cit_"#_pos".go_passive"; \
270 signal: "cit_"#_pos",unselected"; \
271 source: "elm"; \
272 action: STATE_SET "default" 0.0; \
273 target: "cit_"#_pos".pat"; \
274 target: "cit_"#_pos".selected"; \
275 } \
276 program { \
277 name: "cit_"#_pos".focus_highlighted"; \
278 signal: "cit_"#_pos",focused"; \
279 source: "elm"; \
280 script { \
281 set_int(item_focus_enabled, 1); \
282 set_int(last_focused_item, _pos); \
283 if (get_int(win_focus_enabled) == 1) \
284 set_state(PART:"cit_"#_pos".glow", "focused", 0.0); \
285 } \
286 } \
287 program { \
288 name: "cit_"#_pos".focus_unhighlighed"; \
289 signal: "cit_"#_pos",unfocused"; \
290 source: "elm"; \
291 script { \
292 set_int(item_focus_enabled, 0); \
293 set_state(PART:"cit_"#_pos".glow", "default", 0.0); \
294 } \
295 } \
296 program { \
297 name: "cit_"#_pos".is_today"; \
298 signal: "cit_"#_pos",today"; \
299 source: "elm"; \
300 action: STATE_SET "today" 0.0; \
301 target: "cit_"#_pos".text"; \
302 } \
303 program { \
304 name: "cit_"#_pos".not_today"; \
305 signal: "cit_"#_pos",not_today"; \
306 source: "elm"; \
307 action: STATE_SET "default" 0.0; \
308 target: "cit_"#_pos".text"; \
309 } \
310 program { \
311 name: "cit_"#_pos".enable"; \
312 signal: "cit_"#_pos",enable"; \
313 source: "elm"; \
314 script { \
315 new st[31]; \
316 new Float:vl; \
317 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
318 if (!strcmp(st, "disabled")) \
319 set_state(PART:"cit_"#_pos".text", "default", 0.0); \
320 } \
321 } \
322 program { \
323 name: "cit_"#_pos".disable"; \
324 signal: "cit_"#_pos",disable"; \
325 source: "elm"; \
326 action: STATE_SET "disabled" 0.0; \
327 target: "cit_"#_pos".text"; \
328 } \
329 program { \
330 source: "cit_"#_pos".clicked"; \
331 signal: "mouse,down,1"; \
332 source: "cit_"#_pos".event"; \
333 action: STATE_SET "highlighted" 0.0; \
334 target: "cit_"#_pos".selected2"; \
335 } \
336 program { \
337 source: "cit_"#_pos".clicked"; \
338 signal: "mouse,up,1"; \
339 source: "cit_"#_pos".event"; \
340 action: STATE_SET "default" 0.0; \
341 target: "cit_"#_pos".selected2"; \
342 } \
343 program { \
344 source: "cit_"#_pos".clicked"; \
345 signal: "mouse,clicked,1"; \
346 source: "cit_"#_pos".event"; \
347 action: SIGNAL_EMIT "elm,action,selected" #_pos; \
348 } \
349 program { \
350 name: "cit_"#_pos".clear"; \
351 signal: "cit_"#_pos",clear"; \
352 source: "elm"; \
353 action: STATE_SET "default" 0.0; \
354 target: "cit_"#_pos".check"; \
355 after: "cit_"#_pos".weekends_clear"; \
356 after: "cit_"#_pos".holiday_clear"; \
357 } \
358 program { \
359 name: "cit_"#_pos".weekends_clear"; \
360 script { \
361 new st[31]; \
362 new Float:vl; \
363 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
364 if (!strcmp(st, "weekend/day1") || !strcmp(st, "weekend/day2")) \
365 set_state(PART:"cit_"#_pos".text", "default", 0.0); \
366 } \
367 } \
368 program { \
369 name: "cit_"#_pos".holiday_clear"; \
370 script { \
371 new st[31]; \
372 new Float:vl; \
373 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
374 if (!strcmp(st, "holiday")) \
375 set_state(PART:"cit_"#_pos".text", "default", 0.0); \
376 } \
377 } \
378 program { \
379 name: "cit_"#_pos".checked"; \
380 signal: "cit_"#_pos",checked"; \
381 source: "elm"; \
382 action: STATE_SET "visible" 0.0; \
383 target: "cit_"#_pos".check"; \
384 } \
385 program { \
386 name: "cit_"#_pos".holiday"; \
387 signal: "cit_"#_pos",holiday"; \
388 source: "elm"; \
389 script { \
390 new st[31]; \
391 new Float:vl; \
392 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
393 if (strcmp(st, "today")) \
394 set_state(PART:"cit_"#_pos".text", "holiday", 0.0); \
395 } \
396 } \
397 program { \
398 name: "cit_"#_pos".weekend/day1"; \
399 signal: "cit_"#_pos",weekend/day1"; \
400 source: "elm"; \
401 script { \
402 new st[31]; \
403 new Float:vl; \
404 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
405 if ((strcmp(st, "today")) && (strcmp(st, "holiday")) )\
406 set_state(PART:"cit_"#_pos".text", "weekend/day1", 0.0); \
407 } \
408 } \
409 program { \
410 name: "cit_"#_pos".weekend/day2"; \
411 signal: "cit_"#_pos",weekend/day2"; \
412 source: "elm"; \
413 script { \
414 new st[31]; \
415 new Float:vl; \
416 get_state(PART:"cit_"#_pos".text", st, 30, vl); \
417 if ((strcmp(st, "today")) && (strcmp(st, "holiday")) )\
418 set_state(PART:"cit_"#_pos".text", "weekend/day2", 0.0); \
419 } \
420 } \
421 }
422
423group { "efl/calendar";
424 images.image: "sym_left_light_normal.png" COMP;
425 images.image: "sym_right_light_normal.png" COMP;
426 images.image: "sym_left_glow_normal.png" COMP;
427 images.image: "sym_right_glow_normal.png" COMP;
428 images.image: "icon_border_remember.png" COMP;
429 images.image: "outline_glow.png" COMP;
430 images.image: "box_glow.png" COMP;
431 images.image: "diagonal_stripes.png" COMP;
432 data.item: "focus_highlight" "on";
433 script {
434 public rtl;
435 public win_focus_enabled;
436 public item_focus_enabled;
437 public last_focused_item;
438 }
439 styles {
440 CIT_STYLE
441 }
442 parts {
443 part { name: "bg"; type: SPACER;
444 description { state: "default" 0.0;
445 rel1.offset: 1 1;
446 rel2.offset: -2 -2;
447 }
448 }
449 part { name: "background"; type: SWALLOW;
450 description { state: "default" 0.0;
451 rel1.to: "bg";
452 rel2.to: "bg";
453 }
454 }
455 part { name: "spinner-base1"; type: SPACER;
456 description { state: "default" 0.0;
457 min: 24 16;
458 max: 999999 16;
459 rel1.to: "bg";
460 rel2.to: "bg";
461 rel2.relative: 1.0 (1/8);
462 align: 0.5 0.0;
463 }
464 }
465 part { name: "table-base"; type: SPACER;
466 description { state: "default" 0.0;
467 min: 70 60;
468 rel1.to_x: "bg";
469 rel1.to_y: "spinner-base1";
470 rel1.offset: 3 0;
471 rel1.relative: 0.0 1.0;
472 rel2.to: "bg";
473 rel2.offset: -4 -4;
474 }
475 }
476 part { name: "header"; type: SPACER;
477 description { state: "default" 0.0;
478 rel1.to: "table-base";
479 rel2.to: "table-base";
480 rel2.relative: 1.0 (1/7);
481 align: 0.5 0.0;
482 min: 0 16;
483 }
484 }
485 part { name: "header_separator"; mouse_events: 0;
486 description { state: "default" 0.0;
487 fixed: 1 1;
488 rel1.to: "header";
489 rel1.relative: 0.0 1.0;
490 rel1.offset: 0 -2;
491 rel2.to: "header";
492 image.normal: "separator_horiz.png";
493 fill.smooth: 0;
494 }
495 }
496 part { name: "base"; type: SPACER;
497 description { state: "default" 0.0;
498 rel1.to_x: "table-base";
499 rel1.to_y: "header";
500 rel1.relative: 0.0 1.0;
501 rel1.offset: 3 0;
502 rel2.to: "table-base";
503 rel2.offset: -3 0;
504 }
505 }
506
507 CAL_SPIN(,month_text, spinner-base1)
508 CH(0) CH(1) CH(2) CH(3) CH(4) CH(5) CH(6)
509 CIT(0) CIT(1) CIT(2) CIT(3) CIT(4) CIT(5) CIT(6)
510 CIT(7) CIT(8) CIT(9) CIT(10) CIT(11) CIT(12) CIT(13)
511 CIT(14) CIT(15) CIT(16) CIT(17) CIT(18) CIT(19) CIT(20)
512 CIT(21) CIT(22) CIT(23) CIT(24) CIT(25) CIT(26) CIT(27)
513 CIT(28) CIT(29) CIT(30) CIT(31) CIT(32) CIT(33) CIT(34)
514 CIT(35) CIT(36) CIT(37) CIT(38) CIT(39) CIT(40) CIT(41)
515
516 }
517 programs {
518 program {
519 signal: "elm,action,focus_highlight,show";
520 source: "elm";
521 script {
522 set_int(win_focus_enabled, 1);
523 if (get_int(item_focus_enabled) == 1) {
524 new value[32];
525 snprintf(value, 32, "cit_%d,focused", get_int(last_focused_item));
526 emit(value, "elm");
527 }
528 }
529 }
530 program {
531 signal: "elm,action,focus_highlight,hide";
532 source: "elm";
533 script {
534 set_int(win_focus_enabled, 0);
535 }
536 }
537 }
538}
539
540#undef CAL_SPIN
541#undef CIT
542#undef CH
543
544
545group { "efl/calendar/inc_button";
546 inherit: "elm/button/base/calendar/increase/default";
547}
548
549group { "efl/calendar/dec_button";
550 inherit: "elm/button/base/calendar/decrease/default";
551}