apply FSL(Flora Software License)
[apps/home/gallery.git] / res / edc / gl-genlist-item-video.edc
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *     http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #define GENLIST_PART_BOTTOM_LINE_COLOR_VIDEO 82 82 82 255
18 #define GENLIST_PART_BG_SELECTED_COLOR_INC 50 65 74 255
19 #define GENLIST_PART_BG_UNSELECTED_COLOR_INC 0 0 0 0
20 #define GENLIST_PART_BOTTOM_LINE_INC 65 65 65 255
21 #define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 110 // alpha was 64
22
23 #define GENLIST_PART_BASE( param_item_height ) \
24          part { name: "base"; \
25             type: RECT; \
26             repeat_events: 1; \
27             scale: 1; \
28             description { state: "default" 0.0; \
29                min: 0 param_item_height; \
30                color: 0 0 0 0; \
31             } \
32          }
33
34 #define GENLIST_PART_BG_IMAGE \
35          part { name: "bg_image"; \
36             type: RECT; \
37             clip_to: "disclip"; \
38             mouse_events: 0; \
39             description { state: "default" 0.0; \
40                color: GENLIST_PART_BG_UNSELECTED_COLOR_INC; \
41             } \
42             description { state: "selected" 0.0; \
43                inherit: "default" 0.0; \
44                color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
45             } \
46          }
47
48 #define GENLIST_PART_PADDING_TOP( param_padding_size ) \
49        part { name: "elm.padding.top"; \
50             type: RECT; \
51             scale: 1; \
52             description { \
53                state: "default" 0.0; \
54                min: 0 param_padding_size; \
55                fixed: 0 1; \
56                visible: 0; \
57                rel2.relative: 1.0 0.0; \
58                align: 0.0 0.0; \
59             } \
60          }
61
62 #define GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
63        part { name: "elm.padding.bottom"; \
64             type: RECT; \
65             scale: 1; \
66             description { \
67                state: "default" 0.0; \
68                min: 0 param_padding_size; \
69                fixed: 0 1; \
70                visible: 0; \
71                rel1.relative: 0.0 1.0; \
72                align: 0.0 1.0; \
73             } \
74          }
75
76 #define GENLIST_PART_PADDING_LEFT( param_padding_size ) \
77          part { name: "elm.padding.left"; \
78             type: RECT; \
79             scale: 1; \
80             description { \
81                state: "default" 0.0; \
82                min: param_padding_size 0; \
83                fixed: 1 0; \
84                visible: 0; \
85                rel2.relative: 0.0 1.0; \
86                align: 0.0 0.0; \
87             } \
88          }
89
90 #define GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
91        part { name: "elm.padding.right"; \
92             type: RECT; \
93             scale: 1; \
94             description { state: "default" 0.0; \
95                min: param_padding_size 0; \
96                fixed: 1 0; \
97                visible: 0; \
98                rel1.relative: 1.0  0.0; \
99                align: 1.0 0.0; \
100             } \
101          }
102
103 #define GENLIST_PART_DISCLIP \
104         part { name: "disclip"; \
105             type: RECT; \
106             description { state: "default" 0.0; \
107             } \
108             description { state: "disabled" 0.0; \
109                inherit: "default" 0.0; \
110                color: GENLIST_PART_DISCLIP_COLOR_INC; \
111             } \
112          }
113
114 #define GENLIST_PART_BOTTOM_LINE_VIDEO \
115          part { name: "bottom_line"; \
116             type: RECT; \
117             clip_to: "disclip"; \
118             mouse_events: 0; \
119             description { state: "default" 0.0; \
120                min: 0 1; \
121                fixed: 0 1; \
122                visible: 1; \
123                color: GENLIST_PART_BOTTOM_LINE_COLOR_VIDEO; \
124                rel1 { \
125                   relative: 0.0 1.0; \
126                   offset: 0 -1; \
127                } \
128             } \
129          }
130
131 #define VIDEO_COLOR_GAP 239 239 239 127
132 #define VIDEO_COLOR_DURATION 204 204 204 255
133 #define VIDEO_COLOR_TITLE 255 255 255 255
134 #define VIDEO_FONT_TITLE 44
135 #define VIDEO_FONT_DURATION 32
136
137 #define VIDEO_SELECT_ALL_ITEM_H 150
138 #define VIDEO_ITEM_H 160
139 #define VIDEO_PAD_T 22
140 #define VIDEO_PAD_B 32
141 #define VIDEO_PAD_L 16
142 #define VIDEO_PAD_R 16
143 #define VIDEO_PAD_ICON_R 16
144 #define VIDEO_PAD_ICON_L 16
145 #define VIDEO_PAD_BOOKMARK_T 28
146 #define VIDEO_BG_H 128
147 #define VIDEO_BG_W 172
148 #define VIDEO_GAP 2
149 #define VIDEO_TITLE_H 64
150 #define VIDEO_DURATION_H 48
151 #define VIDEO_BOOKMARK_H 64
152 #define VIDEO_BOOKMARK_W 64
153 #define VIDEO_PROGRESSBAR_H 17
154 #define VIDEO_PROGRESSBAR_W 64
155 #define VIDEO_PLAY_H 38
156 #define VIDEO_PLAY_W 38
157 #define VIDEO_CHECKBOX_W 42
158 #define VIDEO_CHECKBOX_H 42
159
160 group { name: "elm/genlist/item/video_list/gallery/default";
161   alias: "elm/genlist/item_odd/video_list/gallery/default";
162   alias: "elm/genlist/item_compress/video_list/gallery/default";
163   alias: "elm/genlist/item_compress_odd/video_list/gallery/default";
164
165   //data.item: "stacking" "above";
166   //data.item: "selectraise" "on";
167   data.item: "texts" "elm.text.title elm.text.duration";
168   data.item: "contents" "elm.icon elm.videoicon elm.bookmarkicon elm.progressbar_icon";
169
170   //data.item: "treesize" "20";
171   parts {
172      GENLIST_PART_BASE( VIDEO_ITEM_H )
173      GENLIST_PART_BG_IMAGE
174      GENLIST_PART_BOTTOM_LINE_VIDEO
175      GENLIST_PART_PADDING_TOP( VIDEO_PAD_T )
176      GENLIST_PART_PADDING_BOTTOM( VIDEO_PAD_B )
177      GENLIST_PART_PADDING_LEFT( VIDEO_PAD_L )
178      GENLIST_PART_PADDING_RIGHT( VIDEO_PAD_R )
179
180      part { name: "elm.padding.icon.right";
181         type: RECT;
182         scale: 1;
183         description { state: "default" 0.0;
184            min: VIDEO_PAD_ICON_R 0;
185            fixed: 1 0;
186            rel1 {
187               relative: 1.0 0.0;
188               to_x: "elm.icon";
189            }
190            rel2 {
191               relative: 1.0 1.0;
192               offset: 0 0;
193               to_x: "elm.icon";
194            }
195            color: 0 0 0 0;
196            align: 0.0 0.0;
197         }
198      }
199      part { name: "icon_bg";
200         clip_to: "disclip";
201         type: RECT;
202         scale: 1;
203         description { state: "default" 0.0;
204            min: VIDEO_BG_W VIDEO_BG_H;
205            max: VIDEO_BG_W VIDEO_BG_H;
206            fixed: 1 1;
207            align: 0.0 0.5;
208            color: VIDEO_COLOR_GAP;
209            rel1 {
210               relative: 1.0 0.0;
211               to_x: "elm.padding.left";
212            }
213            rel2 {
214               relative: 1.0 1.0;
215               offset: 0 0;
216               to_x: "elm.padding.left";
217            }
218         }
219      }
220      part { name: "elm.icon";
221         clip_to: "disclip";
222         type: SWALLOW;
223         scale: 1;
224         description { state: "default" 0.0;
225            fixed: 1 1;
226            align: 0.5 0.5;
227            rel1 {
228               relative: (VIDEO_GAP)/VIDEO_BG_W (VIDEO_GAP)/VIDEO_BG_H;
229               to: "icon_bg";
230            }
231            rel2 {
232               relative: (VIDEO_BG_W-VIDEO_GAP+1)/VIDEO_BG_W (VIDEO_BG_H-VIDEO_GAP+1)/VIDEO_BG_H;
233               to: "icon_bg";
234            }
235         }
236      }
237      part {
238         name: "elm.videoicon";
239         type: SWALLOW;
240                 scale: 1;
241         description {
242                 state: "default" 0.0;
243                 max: VIDEO_PLAY_W VIDEO_PLAY_H;
244                 align: 0.95 0.95;
245                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
246                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
247         }
248         }
249         part { name: "elm.padding.bookmark.top";
250             type: RECT;
251             scale: 1;
252             description {
253                state: "default" 0.0;
254                min: 0 VIDEO_PAD_BOOKMARK_T;
255                fixed: 0 1;
256                visible: 0;
257                rel2.relative: 1.0 0.0;
258                align: 0.0 0.0;
259             }
260          }
261         part { name: "elm.bookmarkicon";
262                 clip_to: "disclip";
263                 scale: 1;
264                 type: SWALLOW;
265                 description { state: "default" 0.0;
266                    min: VIDEO_BOOKMARK_W VIDEO_BOOKMARK_H;
267                    fixed: 1 1;
268                    align: 1.0 0.0;
269                    rel1 {
270                           relative: 0.0 1.0;
271                           to_x: "elm.padding.right";
272                           to_y: "elm.padding.bookmark.top";
273             }
274                    rel2 {
275                           relative: 0.0 0.0;
276                           to_x: "elm.padding.right";
277                    }
278                 }
279         }
280      part { name: "elm.progressbar.icon";
281                 clip_to: "disclip";
282                 scale: 1;
283                 type: SWALLOW;
284                 description { state: "default" 0.0;
285                    min: VIDEO_PROGRESSBAR_W VIDEO_PROGRESSBAR_H;
286                    fixed: 0 1;
287                    align: 1.0 1.0;
288                    rel1 {
289                           relative: 0.0 1.0;
290                           to_x: "elm.bookmarkicon";
291             }
292                    rel2 {
293                           relative: 1.0 0.0;
294                           to_x: "elm.bookmarkicon";
295                           to_y: "elm.padding.bottom";
296                    }
297                 }
298      }
299      part { name: "elm.text.title";
300         clip_to: "disclip";
301         type: TEXT;
302         mouse_events: 0;
303         scale: 1;
304         description { state: "default" 0.0;
305            min: 0 VIDEO_TITLE_H;
306            fixed: 0 1;
307            align: 0.0 0.0;
308            rel1 {
309               relative: 1.0 1.0;
310               to_x: "elm.padding.icon.right";
311               to_y: "elm.padding.top";
312            }
313            rel2 {
314               relative: 0.0 1.0;
315               offset: 0 0;
316               to_x: "elm.bookmarkicon";
317               to_y: "elm.padding.top";
318            }
319            color: VIDEO_COLOR_TITLE;
320            text {
321               font: "Helvetica Neue:style=Roman";
322               size: VIDEO_FONT_TITLE;
323               min: 0 1;
324               align: 0.0 0.5;
325            }
326         }
327      }
328      part { name: "elm.text.duration";
329         clip_to: "disclip";
330         type: TEXT;
331         mouse_events: 0;
332         scale: 1;
333         description { state: "default" 0.0;
334            min: 0 VIDEO_DURATION_H;
335            fixed: 0 1;
336            align: 0.0 0.0;
337            rel1 {
338               relative: 1.0  1.0;
339               to_x: "elm.padding.icon.right";
340               to_y: "elm.text.title";
341            }
342            rel2 {
343               relative: 0 1;
344               offset: 0 0;
345               to_x: "elm.padding.right";
346               to_y: "elm.text.title";
347            }
348            color: VIDEO_COLOR_DURATION;
349            text {
350               font: "Helvetica Neue:style=Medium";
351               size: VIDEO_FONT_DURATION;
352               min: 0 1;
353               align: 0.0 0.5;
354            }
355         }
356      }
357
358    GENLIST_PART_DISCLIP
359   }
360   programs {
361      program { name: "go_active";
362         signal: "elm,state,selected";
363         source: "elm";
364         action: STATE_SET "selected" 0.0;
365         target: "bg_image";
366      }
367      program { name: "go_passive";
368         signal: "elm,state,unselected";
369         source: "elm";
370         action: STATE_SET "default" 0.0;
371         target: "bg_image";
372         transition: LINEAR 0.1;
373      }
374      program { name: "go_disabled";
375         signal: "elm,state,disabled";
376         source: "elm";
377         action: STATE_SET "disabled" 0.0;
378         target: "disclip";
379      }
380      program { name: "go_enabled";
381         signal: "elm,state,enabled";
382         source: "elm";
383         action: STATE_SET "default" 0.0;
384         target: "disclip";
385      }
386   }
387 }
388
389
390 group { name: "elm/genlist/item/video_list_edit/gallery/default";
391   alias: "elm/genlist/item_odd/video_list_edit/gallery/default";
392
393   //data.item: "stacking" "above";
394   //data.item: "selectraise" "on";
395   data.item: "texts" "elm.text.title elm.text.duration";
396   data.item: "contents" "elm.swallow.checkbox elm.icon elm.videoicon elm.bookmarkicon elm.progressbar_icon";
397
398   //data.item: "treesize" "20";
399   parts {
400      GENLIST_PART_BASE( VIDEO_ITEM_H )
401      GENLIST_PART_BG_IMAGE
402      GENLIST_PART_BOTTOM_LINE_VIDEO
403      GENLIST_PART_PADDING_TOP( VIDEO_PAD_T )
404      GENLIST_PART_PADDING_BOTTOM( VIDEO_PAD_B )
405      GENLIST_PART_PADDING_LEFT( VIDEO_PAD_L )
406      GENLIST_PART_PADDING_RIGHT( VIDEO_PAD_R )
407
408 //checkbox
409      part { name: "elm.swallow.checkbox";
410         clip_to: "disclip";
411         type: SWALLOW;
412         scale: 1;
413         description { state: "default" 0.0;
414            min: VIDEO_CHECKBOX_W VIDEO_CHECKBOX_H;
415            max: VIDEO_CHECKBOX_W VIDEO_CHECKBOX_H;
416            fixed: 1 1;
417            align: 0.0 0.5;
418            rel1 {
419               relative: 1.0 0.0;
420               to_x: "elm.padding.left";
421            }
422            rel2 {
423               relative: 1.0 1.0;
424               offset: 0 0;
425               to_x: "elm.padding.left";
426            }
427         }
428      }
429      part { name: "elm.padding.icon.left";
430         type: RECT;
431         scale: 1;
432         description { state: "default" 0.0;
433            min: VIDEO_PAD_ICON_L 0;
434            fixed: 1 0;
435            rel1 {
436               relative: 1.0 0.0;
437               to_x: "elm.swallow.checkbox";
438            }
439            rel2 {
440               relative: 1.0 1.0;
441               offset: 0 0;
442               to_x: "elm.swallow.checkbox";
443            }
444            color: 0 0 0 0;
445            align: 0.0 0.0;
446         }
447      }
448      part { name: "elm.padding.icon.right";
449         type: RECT;
450         scale: 1;
451         description { state: "default" 0.0;
452            min: VIDEO_PAD_ICON_R 0;
453            fixed: 1 0;
454            rel1 {
455               relative: 1.0 0.0;
456               to_x: "elm.icon";
457            }
458            rel2 {
459               relative: 1.0 1.0;
460               offset: 0 0;
461               to_x: "elm.icon";
462            }
463            color: 0 0 0 0;
464            align: 0.0 0.0;
465         }
466      }
467      part { name: "icon_bg";
468         clip_to: "disclip";
469         type: RECT;
470         scale: 1;
471         description { state: "default" 0.0;
472            min: VIDEO_BG_W VIDEO_BG_H;
473            max: VIDEO_BG_W VIDEO_BG_H;
474            fixed: 1 1;
475            align: 0.0 0.5;
476            color: VIDEO_COLOR_GAP;
477            rel1 {
478               relative: 1.0 0.0;
479               to_x: "elm.padding.icon.left";
480            }
481            rel2 {
482               relative: 1.0 1.0;
483               offset: 0 0;
484               to_x: "elm.padding.icon.left";
485            }
486         }
487      }
488      part { name: "elm.icon";
489         clip_to: "disclip";
490         type: SWALLOW;
491         scale: 1;
492         description { state: "default" 0.0;
493            fixed: 1 1;
494            align: 0.5 0.5;
495            rel1 {
496               relative: (VIDEO_GAP)/VIDEO_BG_W (VIDEO_GAP)/VIDEO_BG_H;
497               to: "icon_bg";
498            }
499            rel2 {
500               relative: (VIDEO_BG_W-VIDEO_GAP+1)/VIDEO_BG_W (VIDEO_BG_H-VIDEO_GAP+1)/VIDEO_BG_H;
501               to: "icon_bg";
502            }
503         }
504      }
505      part {
506         name: "elm.videoicon";
507         type: SWALLOW;
508                 scale: 1;
509         description {
510                 state: "default" 0.0;
511                                 max: VIDEO_PLAY_W VIDEO_PLAY_H;
512                                 align: 0.95 0.95;
513                                 color: 0 0 0 0;
514                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
515                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
516         }
517         }
518         part { name: "elm.padding.bookmark.top";
519             type: RECT;
520             scale: 1;
521             description {
522                state: "default" 0.0;
523                min: 0 VIDEO_PAD_BOOKMARK_T;
524                fixed: 0 1;
525                visible: 0;
526                rel2.relative: 1.0 0.0;
527                align: 0.0 0.0;
528             }
529          }
530         part { name: "elm.bookmarkicon";
531                 clip_to: "disclip";
532                 scale: 1;
533                 type: SWALLOW;
534                 description { state: "default" 0.0;
535                    min: VIDEO_BOOKMARK_W VIDEO_BOOKMARK_H;
536                    fixed: 1 1;
537                    align: 1.0 0.0;
538                    rel1 {
539                           relative: 0.0 1.0;
540                           to_x: "elm.padding.right";
541                           to_y: "elm.padding.bookmark.top";
542             }
543                    rel2 {
544                           relative: 0.0 0.0;
545                           to_x: "elm.padding.right";
546                    }
547                 }
548         }
549      part { name: "elm.progressbar.icon";
550                 clip_to: "disclip";
551                 scale: 1;
552                 type: SWALLOW;
553                 description { state: "default" 0.0;
554                    min: VIDEO_PROGRESSBAR_W VIDEO_PROGRESSBAR_H;
555                    fixed: 0 1;
556                    align: 1.0 1.0;
557                    rel1 {
558                           relative: 0.0 1.0;
559                           to_x: "elm.bookmarkicon";
560             }
561                    rel2 {
562                           relative: 1.0 0.0;
563                           to_x: "elm.bookmarkicon";
564                           to_y: "elm.padding.bottom";
565                    }
566                 }
567      }
568      part { name: "elm.text.title";
569         clip_to: "disclip";
570         type: TEXT;
571         mouse_events: 0;
572         scale: 1;
573         description { state: "default" 0.0;
574            min: 0 VIDEO_TITLE_H;
575            fixed: 0 1;
576            align: 0.0 0.0;
577            rel1 {
578               relative: 1.0 1.0;
579               to_x: "elm.padding.icon.right";
580               to_y: "elm.padding.top";
581            }
582            rel2 {
583               relative: 0.0 1.0;
584               offset: 0 0;
585               to_x: "elm.bookmarkicon";
586               to_y: "elm.padding.top";
587            }
588            color: VIDEO_COLOR_TITLE;
589            text {
590               font: "Helvetica Neue:style=Roman";
591               size: VIDEO_FONT_TITLE;
592               min: 0 1;
593               align: 0.0 0.5;
594            }
595         }
596      }
597      part { name: "elm.text.duration";
598         clip_to: "disclip";
599         type: TEXT;
600         mouse_events: 0;
601         scale: 1;
602         description { state: "default" 0.0;
603            min: 0 VIDEO_DURATION_H;
604            fixed: 0 1;
605            align: 0.0 0.0;
606            rel1 {
607               relative: 1.0  1.0;
608               to_x: "elm.padding.icon.right";
609               to_y: "elm.text.title";
610            }
611            rel2 {
612               relative: 0 1;
613               offset: 0 0;
614               to_x: "elm.padding.right";
615               to_y: "elm.text.title";
616            }
617            color: VIDEO_COLOR_DURATION;
618            text {
619               font: "Helvetica Neue:style=Medium";
620               size: VIDEO_FONT_DURATION;
621               min: 0 1;
622               align: 0.0 0.5;
623            }
624         }
625      }
626
627    GENLIST_PART_DISCLIP
628   }
629   programs {
630      program { name: "go_active";
631         signal: "elm,state,selected";
632         source: "elm";
633         action: STATE_SET "selected" 0.0;
634         target: "bg_image";
635      }
636      program { name: "go_passive";
637         signal: "elm,state,unselected";
638         source: "elm";
639         action: STATE_SET "default" 0.0;
640         target: "bg_image";
641         transition: LINEAR 0.1;
642      }
643      program { name: "go_disabled";
644         signal: "elm,state,disabled";
645         source: "elm";
646         action: STATE_SET "disabled" 0.0;
647         target: "disclip";
648      }
649      program { name: "go_enabled";
650         signal: "elm,state,enabled";
651         source: "elm";
652         action: STATE_SET "default" 0.0;
653         target: "disclip";
654      }
655   }
656 }
657