theme cleanup
[profile/ivi/lemolo.git] / data / themes / includes / contacts.edc
1 group {
2    name: "elm/genlist/item/contacts/default";
3
4    data {
5       item: "texts" "text.contacts.name text.contacts.last";
6       item: "contents" "swallow.photo";
7    }
8
9    parts{
10       part {
11          name: "bg";
12          type: RECT;
13          mouse_events: 1;
14          description {
15             state: "default" 0.0;
16             color: 255 255 255 0;
17             color_class: "action";
18             min: WIDTH LIST_CONTACT_HEIGHT;
19          }
20          description {
21             state: "selected" 0.0;
22             inherit: "default" 0.0;
23             color: 255 255 255 255;
24          }
25       }
26
27       part {
28          name: "img.border";
29          type: RECT;
30          scale: 1;
31          mouse_events: 0;
32          description {
33             state: "default" 0.0;
34             color: 255 255 255 255;
35             color_class: "action";
36             rel1 {
37                to: "swallow.photo";
38                relative: 0.0 0.0;
39                offset: -1 -1;
40             }
41             rel2 {
42                to: "swallow.photo";
43                relative: 1.0 1.0;
44                offset: 0 0;
45             }
46          }
47          description {
48             state: "selected" 0.0;
49             inherit: "default" 0.0;
50             color_class: "bg";
51          }
52       }
53
54       part {
55          name: "img.bg";
56          type: RECT;
57          scale: 1;
58          mouse_events: 0;
59          description {
60             state: "default" 0.0;
61             color: 255 255 255 255;
62             color_class: "dark";
63             rel1 {
64                to: "swallow.photo";
65                relative: 0.0 0.0;
66                offset: 0 0;
67             }
68             rel2 {
69                to: "swallow.photo";
70                relative: 1.0 1.0;
71                offset: -1 -1;
72             }
73          }
74          description {
75             state: "selected" 0.0;
76             inherit: "default" 0.0;
77             color_class: "bg";
78          }
79       }
80
81       part {
82          name: "swallow.photo";
83          type: SWALLOW;
84          scale: 1;
85          mouse_events: 0;
86          description {
87             state: "default" 0.0;
88             min: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
89             max: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
90             align: 0.0 0.5;
91             fixed: 1 1;
92             rel1 {
93                relative: 0.0 0.0;
94                offset: BORDER_PADDING 0;
95             }
96             rel2 {
97                relative: 0.0 1.0;
98                offset: BORDER_PADDING -1;
99             }
100          }
101       }
102
103        part {
104          name: "text.contacts.name";
105          type: TEXT;
106          scale: 1;
107          mouse_events: 0;
108          description {
109             state: "default" 0.0;
110             color: 255 255 255 255;
111             color_class: "action";
112             rel1 {
113                to: "swallow.photo";
114                relative: 1.0 0.0;
115                offset: ITEM_PADDING 0;
116             }
117             rel2 {
118                to_y: "swallow.photo";
119                relative: 1.0 0.7;
120                offset: (-BORDER_PADDING -1) -1;
121             }
122             text {
123                font: FONT_NORMAL;
124                size: SIZE_LARGE;
125                align: 0.0 0.0;
126                ellipsis: 0.0;
127             }
128          }
129          description {
130             state: "selected" 0.0;
131             inherit: "default" 0.0;
132             color_class: "bg";
133          }
134       }
135
136        part {
137          name: "text.contacts.last";
138          type: TEXT;
139          scale: 1;
140          mouse_events: 0;
141          description {
142             state: "default" 0.0;
143             color: 255 255 255 255;
144             color_class: "light";
145             rel1 {
146                to: "swallow.photo";
147                relative: 1.0 0.7;
148                offset: ITEM_PADDING 0;
149             }
150             rel2 {
151                to_y: "swallow.photo";
152                relative: 1.0 1.0;
153                offset: (-BORDER_PADDING -1) -1;
154             }
155             text {
156                font: FONT_NORMAL;
157                size: SIZE_MEDIUM;
158                align: 0.0 0.5;
159                ellipsis: 0.0;
160            }
161          }
162          description {
163             state: "selected" 0.0;
164             inherit: "default" 0.0;
165             color_class: "bg";
166          }
167        }
168
169       programs {
170
171          program {
172             signal: "elm,state,selected";
173             source: "elm";
174             action: STATE_SET "selected" 0.0;
175             target: "bg";
176             target: "text.contacts.name";
177             target: "text.contacts.last";
178             target: "img.border";
179          }
180
181          program {
182             signal: "elm,state,unselected";
183             source: "elm";
184             action: STATE_SET "default" 0.0;
185             target: "bg";
186             target: "text.contacts.name";
187             target: "text.contacts.last";
188             target: "img.border";
189          }
190       }
191    }
192 }
193
194 group {
195    name: "elm/genlist/item/group_contacts/default";
196
197    data {
198       item: "texts" "text.group";
199    }
200
201    parts {
202       part {
203          name: "bg";
204          type: RECT;
205          scale: 1;
206          mouse_events: 0;
207          description {
208             state: "default" 0.0;
209             color: 255 255 255 255;
210             color_class: "action";
211             min: (BORDER_PADDING + CONTACT_PHOTO_SIZE) GROUP_HEIGHT;
212             max: (BORDER_PADDING + CONTACT_PHOTO_SIZE) GROUP_HEIGHT;
213             align: 0.0 0.5;
214          }
215       }
216
217       part {
218          name: "text.group";
219          type: TEXT;
220          mouse_events: 0;
221          scale: 1;
222          description {
223             state: "default" 0.0;
224             color: 255 255 255 255;
225             color_class: "bg";
226             rel2 {
227                to: "bg";
228                offset: -ITEM_PADDING -1;
229             }
230             text {
231                font: FONT_BOLD;
232                size: SIZE_SMALL;
233                fit: 1 1;
234                align: 1.0 0.5;
235                ellipsis: 0.0;
236             }
237          }
238       }
239    }
240 }
241
242 group {
243    name: "elm/layout/dialer/contacts_details";
244
245    parts {
246
247       part {
248          name: "img.border";
249          type: RECT;
250          scale: 1;
251          mouse_events: 0;
252          description {
253             state: "default" 0.0;
254             color: 255 255 255 255;
255             color_class: "action";
256             rel1 {
257                to: "swallow.photo";
258                relative: 0.0 0.0;
259                offset: -1 -1;
260             }
261             rel2 {
262                to: "swallow.photo";
263                relative: 1.0 1.0;
264                offset: 0 0;
265             }
266          }
267          description {
268             state: "selected" 0.0;
269             inherit: "default" 0.0;
270             color_class: "bg";
271          }
272       }
273
274       part {
275          name: "img.bg";
276          type: RECT;
277          scale: 1;
278          mouse_events: 0;
279          description {
280             state: "default" 0.0;
281             color: 255 255 255 255;
282             color_class: "dark";
283             rel1 {
284                to: "swallow.photo";
285                relative: 0.0 0.0;
286                offset: 0 0;
287             }
288             rel2 {
289                to: "swallow.photo";
290                relative: 1.0 1.0;
291                offset: -1 -1;
292             }
293          }
294          description {
295             state: "selected" 0.0;
296             inherit: "default" 0.0;
297             color_class: "bg";
298          }
299       }
300
301       part {
302          name: "swallow.photo";
303          type: SWALLOW;
304          scale: 1;
305          mouse_events: 0;
306          description {
307             state: "default" 0.0;
308             min: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
309             max: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
310             rel1 {
311                relative: 0.0 0.0;
312                offset: BORDER_PADDING 0;
313             }
314             rel2 {
315                relative: 0.0 0.0;
316                offset: (BORDER_PADDING+CONTACT_PHOTO_SIZE) (CONTACT_PHOTO_SIZE+ITEM_PADDING);
317             }
318          }
319       }
320
321       part {
322          name: "text.name";
323          type: TEXT;
324          scale: 1;
325          mouse_events: 0;
326          description {
327             state: "default" 0.0;
328             color: 255 255 255 255;
329             color_class: "action";
330             rel1 {
331                to: "swallow.photo";
332                relative: 1.0 0.0;
333                offset: ITEM_PADDING ITEM_PADDING;
334             }
335             rel2 {
336                to_y: "swallow.photo";
337                relative: 1.0 0.5;
338                offset: -BORDER_PADDING -ITEM_PADDING;
339             }
340             text {
341                font: FONT_NORMAL;
342                size: SIZE_HUGE;
343                fit: 0 0;
344                align: 0.0 0.5;
345                ellipsis: 0.0;
346            }
347          }
348       }
349
350       part {
351          name: "text.last.name";
352          type: TEXT;
353          scale: 1;
354          mouse_events: 0;
355          description {
356             state: "default" 0.0;
357             color: 255 255 255 128;
358             color_class: "action";
359              rel1 {
360                to: "text.name";
361                relative: 0.0 1.0;
362                 offset: 0 ITEM_PADDING;
363             }
364             rel2 {
365                to_x: "text.name";
366                to_y: "swallow.photo";
367                relative: 1.0 1.0;
368                offset: 0 ITEM_PADDING;
369             }
370             text {
371                font: FONT_NORMAL;
372                size: SIZE_MEDIUM;
373                fit: 0 1;
374                align: 0.0 0.0;
375                ellipsis: 0.0;
376            }
377          }
378       }
379
380       part {
381          name: "box.phones";
382          type: BOX;
383          scale: 1;
384          mouse_events: 1;
385          description {
386             state: "default" 0.0;
387             box {
388                layout: "vertical_homogeneous";
389             }
390             rel1 {
391                to_y: "swallow.photo";
392                relative: 0.0 1.0;
393                offset: 0 (ITEM_PADDING+ACTION_HEIGHT);
394             }
395             rel2 {
396                to_y: "bg.buttons";
397                relative: 1.0 0.0;
398                offset: -1 0;
399             }
400          }
401       }
402
403       part {
404          name: "bg.buttons";
405          type: RECT;
406          mouse_events: 0;
407          description {
408             state: "default" 0.0;
409             color: 0 0 0 0;
410             min: WIDTH ACTION_HEIGHT;
411             max: WIDTH 99999; /* keep it tight centered */
412             rel1 {
413                relative: 0.0 1.0;
414                offset: 0 -ACTION_HEIGHT;
415             }
416          }
417       }
418 #define BUTTON(id, label, ccls, r1, r2)                                 \
419       part {                                                            \
420          name: "button."##id;                                           \
421          type: RECT;                                                    \
422          mouse_events: 1;                                               \
423          description {                                                  \
424             state: "default" 0.0;                                       \
425             color: 255 255 255 0;                                       \
426             color_class: "action";                                      \
427             rel1 {                                                      \
428                to: "bg.buttons";                                        \
429                relative: r1;                                            \
430             }                                                           \
431             rel2 {                                                      \
432                to: "bg.buttons";                                        \
433                relative: r2;                                            \
434             }                                                           \
435          }                                                              \
436          description {                                                  \
437             state: "pressed" 0.0;                                       \
438             inherit: "default" 0.0;                                     \
439             color: 255 255 255 255;                                     \
440          }                                                              \
441       }                                                                 \
442       part {                                                            \
443          name: "label."##id;                                            \
444          type: TEXT;                                                    \
445          mouse_events: 0;                                               \
446          description {                                                  \
447             state: "default" 0.0;                                       \
448             color: 255 255 255 255;                                     \
449             color_class: ccls;                                          \
450             rel1.to: "button."##id;                                     \
451             rel2 {                                                      \
452                to: "button."##id;                                       \
453             }                                                           \
454             text {                                                      \
455                text: label;                                             \
456                font: FONT_NORMAL;                                       \
457                size: SIZE_HUGE;                                         \
458                align: 0.5 0.5;                                          \
459             }                                                           \
460          }                                                              \
461          description {                                                  \
462             state: "pressed" 0.0;                                       \
463             inherit: "default" 0.0;                                     \
464             color: 16 16 16 255;                                        \
465          }                                                              \
466       }                                                                 \
467                                                                         \
468       programs {                                                        \
469          program {                                                      \
470             signal: "mouse,up,1";                                       \
471             source: "button."##id;                                      \
472             action: SIGNAL_EMIT "released,"##id "keypad";               \
473             after: "show_up_"##id;                                      \
474             api: id"_released" id" was released";                       \
475          }                                                              \
476          program {                                                      \
477             name: "show_up_"##id;                                       \
478             action: STATE_SET "default" 0.0;                            \
479             transition: DECELERATE 0.1;                                 \
480             target: "button."##id;                                      \
481             target: "label."##id;                                       \
482          }                                                              \
483          program {                                                      \
484             signal: "mouse,down,1";                                     \
485             source: "button."##id;                                      \
486             after: "show_down_"##id;                                    \
487             action: SIGNAL_EMIT "pressed,"##id "keypad";                \
488             api: id"_pressed" id" was pressed";                         \
489          }                                                              \
490          program {                                                      \
491             name: "show_down_"##id;                                     \
492             action: STATE_SET "pressed" 0.0;                            \
493             transition: ACCELERATE 0.1;                                 \
494             target: "button."##id;                                      \
495             target: "label."##id;                                       \
496          }                                                              \
497          program {                                                      \
498             signal: "mouse,clicked,1";                                  \
499             source: "button."##id;                                      \
500             action: SIGNAL_EMIT "clicked,"##id "gui";                   \
501             api: id"_clicked" id" was clicked";                         \
502          }                                                              \
503       }
504
505       BUTTON("back",    "Back",    "action", 0.0 0.0, 1.0 1.0);
506 #undef BUTTON
507    }
508 }
509
510 group {
511
512    name: "elm/icon/no-picture/default";
513
514    images{
515       image: "ico_person.png" COMP;
516    }
517
518    parts {
519       part {
520          name : "base";
521          scale: 1;
522          description {
523             state: "default" 0.0;
524             aspect: 1.0 1.0;
525             aspect_preference: BOTH;
526             image.normal: "ico_person.png";
527          }
528       }
529    }
530 }
531 group {
532
533    name: "elm/button/base/contacts";
534
535    parts {
536       part {
537          name: "bg";
538          type: RECT;
539          scale: 1;
540          description {
541             state: "default" 0.0;
542             color: 255 255 255 0;
543             color_class: "action";
544          }
545          description {
546             state: "pressed" 0.0;
547             inherit: "default" 0.0;
548             color: 255 255 255 255;
549          }
550       }
551
552       part {
553          name: "elm.text.phone";
554          type: TEXT;
555          mouse_events: 0;
556          description {
557             state: "default" 0.0;
558             color: 255 255 255 255;
559             color_class: "action";
560             rel1 {
561                offset: BORDER_PADDING 0;
562             }
563             rel2 {
564                to_y: "elm.text.type";
565                relative: 1.0 0.0;
566                offset: (-BORDER_PADDING -1) ITEM_PADDING;
567             }
568             text {
569                font: FONT_NORMAL;
570                size: SIZE_HUGE;
571                size_range: SIZE_SMALL SIZE_HUGE;
572                fit: 1 1;
573                align: 0.5 0.5;
574                ellipsis: 1.0;
575             }
576          }
577          description {
578             state: "pressed" 0.0;
579             inherit: "default" 0.0;
580             color: 16 16 16 255;
581          }
582       }
583
584       part {
585          name: "elm.text.type";
586          type: TEXT;
587          mouse_events: 0;
588          description {
589             state: "default" 0.0;
590             color: 255 255 255 128;
591             color_class: "action";
592             align: 0.5 1.0;
593             fixed: 1 1;
594             rel1 {
595                relative: 0.0 1.0;
596                offset: BORDER_PADDING (-ITEM_PADDING - 1);
597             }
598             rel2 {
599                relative: 1.0 1.0;
600                offset: (-BORDER_PADDING -1) (-ITEM_PADDING - 1);
601             }
602             text {
603                font: FONT_NORMAL;
604                size: SIZE_MEDIUM;
605                min: 0 1;
606                align: 0.5 1.0;
607                ellipsis: 0.0;
608             }
609          }
610          description {
611             state: "pressed" 0.0;
612             inherit: "default" 0.0;
613             color: 16 16 16 255;
614          }
615       }
616
617 #define SEPARATOR(id, rely, offy, relto)                                \
618       part {                                                            \
619          name: "separator.dark."##id;                                   \
620          type: RECT;                                                    \
621          mouse_events: 0;                                               \
622          description {                                                  \
623             state: "default" 0.0;                                       \
624             color: 255 255 255 255;                                     \
625             color_class: "dark";                                        \
626             rel1 {                                                      \
627                relative: 0.0 rely;                                      \
628                offset: 0 offy;                                          \
629                to_y: relto;                                             \
630             }                                                           \
631             rel2 {                                                      \
632                relative: 1.0 rely;                                      \
633                offset: -1 (offy + SEPARATOR_HEIGHT / 2);                \
634                to_y: relto;                                             \
635             }                                                           \
636          }                                                              \
637       }                                                                 \
638       part {                                                            \
639          name: "separator.bg."##id;                                     \
640          type: RECT;                                                    \
641          mouse_events: 0;                                               \
642          description {                                                  \
643             state: "default" 0.0;                                       \
644             color: 255 255 255 255;                                     \
645             color_class: "bg";                                          \
646             rel1 {                                                      \
647                relative: 0.0 rely;                                      \
648                offset: 0 (offy + SEPARATOR_HEIGHT / 2);                 \
649                to_y: relto;                                             \
650             }                                                           \
651             rel2 {                                                      \
652                relative: 1.0 rely;                                      \
653                offset: -1 (offy + SEPARATOR_HEIGHT);                    \
654                to_y: relto;                                             \
655             }                                                           \
656          }                                                              \
657       }
658
659       SEPARATOR("bottom", 1.0, -SEPARATOR_HEIGHT, "");
660 #undef SEPARATOR
661    }
662
663    programs {
664
665       program {
666          signal: "mouse,clicked,1";
667          source: "bg";
668          action: SIGNAL_EMIT "elm,action,click" "";
669       }
670
671       program {
672          signal: "mouse,down,1";
673          source: "bg";
674          transition: ACCELERATE 0.3;
675          action: STATE_SET "pressed" 0.0;
676          target: "bg";
677          target: "elm.text.phone";
678          target: "elm.text.type";
679       }
680
681       program {
682          signal: "mouse,up,1";
683          source: "bg";
684          transition: DECELERATE 0.3;
685          action: STATE_SET "default" 0.0;
686          target: "bg";
687          target: "elm.text.phone";
688          target: "elm.text.type";
689       }
690    }
691 }