apply FSL(Flora Software License)
[apps/home/gallery.git] / res / white_theme / 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 169 169 169 255
18 #define GENLIST_PART_BG_SELECTED_COLOR_INC 42 137 194 255
19 #define GENLIST_PART_BG_UNSELECTED_COLOR_INC 249 249 249 255
20 #define GENLIST_PART_BOTTOM_LINE_INC 169 169 169 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 190 189 189 255
132 #define VIDEO_COLOR_DURATION 124 124 124 255
133 #define VIDEO_COLOR_TITLE 0 0 0 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_FAVOR_H 38
158 #define VIDEO_FAVOR_W 36
159 #define VIDEO_CHECKBOX_W 42
160 #define VIDEO_CHECKBOX_H 42
161
162 group { name: "elm/genlist/item/video_list/gallery/default";
163   alias: "elm/genlist/item_odd/video_list/gallery/default";
164   alias: "elm/genlist/item_compress/video_list/gallery/default";
165   alias: "elm/genlist/item_compress_odd/video_list/gallery/default";
166
167   data.item: "stacking" "above";
168   data.item: "selectraise" "on";
169   data.item: "texts" "elm.text.title elm.text.duration";
170   data.item: "contents" "elm.icon elm.videoicon elm.bookmarkicon elm.favourites.icon elm.progressbar.icon";
171
172   data.item: "treesize" "20";
173   parts {
174      GENLIST_PART_BASE( VIDEO_ITEM_H )
175      GENLIST_PART_BG_IMAGE
176      GENLIST_PART_BOTTOM_LINE_VIDEO
177      GENLIST_PART_PADDING_TOP( VIDEO_PAD_T )
178      GENLIST_PART_PADDING_BOTTOM( VIDEO_PAD_B )
179      GENLIST_PART_PADDING_LEFT( VIDEO_PAD_L )
180      GENLIST_PART_PADDING_RIGHT( VIDEO_PAD_R )
181
182      part { name: "elm.padding.icon.right";
183         type: RECT;
184         scale: 1;
185         description { state: "default" 0.0;
186            min: VIDEO_PAD_ICON_R 0;
187            fixed: 1 0;
188            rel1 {
189               relative: 1.0 0.0;
190               to_x: "elm.icon";
191            }
192            rel2 {
193               relative: 1.0 1.0;
194               offset: 0 0;
195               to_x: "elm.icon";
196            }
197            color: 0 0 0 0;
198            align: 0.0 0.0;
199         }
200      }
201      part { name: "icon_bg";
202         clip_to: "disclip";
203         type: RECT;
204         scale: 1;
205         description { state: "default" 0.0;
206            min: VIDEO_BG_W VIDEO_BG_H;
207            max: VIDEO_BG_W VIDEO_BG_H;
208            fixed: 1 1;
209            align: 0.0 0.5;
210            color: VIDEO_COLOR_GAP;
211            rel1 {
212               relative: 1.0 0.0;
213               to_x: "elm.padding.left";
214            }
215            rel2 {
216               relative: 1.0 1.0;
217               offset: 0 0;
218               to_x: "elm.padding.left";
219            }
220         }
221      }
222      part { name: "elm.icon";
223         clip_to: "disclip";
224         type: SWALLOW;
225         scale: 1;
226         description { state: "default" 0.0;
227            fixed: 1 1;
228            align: 0.5 0.5;
229            rel1 {
230               relative: (VIDEO_GAP)/VIDEO_BG_W (VIDEO_GAP)/VIDEO_BG_H;
231               to: "icon_bg";
232            }
233            rel2 {
234               relative: (VIDEO_BG_W-VIDEO_GAP+1)/VIDEO_BG_W (VIDEO_BG_H-VIDEO_GAP+1)/VIDEO_BG_H;
235               to: "icon_bg";
236            }
237         }
238      }
239      part {
240         name: "elm.videoicon";
241         type: SWALLOW;
242                 scale: 1;
243         description {
244                 state: "default" 0.0;
245                 max: VIDEO_PLAY_W VIDEO_PLAY_H;
246                 align: 0.95 0.95;
247                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
248                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
249         }
250         }
251         part { name: "elm.favourites.icon";
252                 type: SWALLOW;
253                 scale: 1;
254                 description {
255                                 state: "default" 0.0;
256                                 max: VIDEO_FAVOR_W VIDEO_FAVOR_H;
257                                 align: 0.98 0.0;
258                                 fixed: 1 0;
259                                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
260                                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
261                         }
262         }
263         part { name: "elm.padding.bookmark.top";
264             type: RECT;
265             scale: 1;
266             description {
267                state: "default" 0.0;
268                min: 0 VIDEO_PAD_BOOKMARK_T;
269                fixed: 0 1;
270                visible: 0;
271                rel2.relative: 1.0 0.0;
272                align: 0.0 0.0;
273             }
274          }
275         part { name: "elm.bookmarkicon";
276                 clip_to: "disclip";
277                 scale: 1;
278                 type: SWALLOW;
279                 description { state: "default" 0.0;
280                    min: VIDEO_BOOKMARK_W VIDEO_BOOKMARK_H;
281                    fixed: 1 1;
282                    align: 1.0 0.0;
283                    rel1 {
284                           relative: 0.0 1.0;
285                           to_x: "elm.padding.right";
286                           to_y: "elm.padding.bookmark.top";
287             }
288                    rel2 {
289                           relative: 0.0 0.0;
290                           to_x: "elm.padding.right";
291                    }
292                 }
293         }
294      part { name: "elm.progressbar.icon";
295                 clip_to: "disclip";
296                 scale: 1;
297                 type: SWALLOW;
298                 description { state: "default" 0.0;
299                    min: VIDEO_PROGRESSBAR_W VIDEO_PROGRESSBAR_H;
300                    fixed: 0 1;
301                    align: 1.0 1.0;
302                    rel1 {
303                           relative: 0.0 1.0;
304                           to_x: "elm.bookmarkicon";
305             }
306                    rel2 {
307                           relative: 1.0 0.0;
308                           to_x: "elm.bookmarkicon";
309                           to_y: "elm.padding.bottom";
310                    }
311                 }
312      }
313      part { name: "elm.text.title";
314         clip_to: "disclip";
315         type: TEXT;
316         mouse_events: 0;
317         scale: 1;
318         description { state: "default" 0.0;
319            min: 0 VIDEO_TITLE_H;
320            fixed: 0 1;
321            align: 0.0 0.0;
322            rel1 {
323               relative: 1.0 1.0;
324               to_x: "elm.padding.icon.right";
325               to_y: "elm.padding.top";
326            }
327            rel2 {
328               relative: 0.0 1.0;
329               offset: 0 0;
330               to_x: "elm.bookmarkicon";
331               to_y: "elm.padding.top";
332            }
333            color: VIDEO_COLOR_TITLE;
334            text {
335               font: "SLP:style=Roman";
336               text_class: "slp_roman";
337               size: VIDEO_FONT_TITLE;
338               min: 0 1;
339               align: 0.0 0.5;
340            }
341         }
342      }
343      part { name: "elm.text.duration";
344         clip_to: "disclip";
345         type: TEXT;
346         mouse_events: 0;
347         scale: 1;
348         description { state: "default" 0.0;
349            min: 0 VIDEO_DURATION_H;
350            fixed: 0 1;
351            align: 0.0 0.0;
352            rel1 {
353               relative: 1.0  1.0;
354               to_x: "elm.padding.icon.right";
355               to_y: "elm.text.title";
356            }
357            rel2 {
358               relative: 0 1;
359               offset: 0 0;
360               to_x: "elm.padding.right";
361               to_y: "elm.text.title";
362            }
363            color: VIDEO_COLOR_DURATION;
364            text {
365               font: "SLP:style=Medium";
366               text_class: "slp_medium";
367               size: VIDEO_FONT_DURATION;
368               min: 0 1;
369               align: 0.0 0.5;
370            }
371         }
372      }
373
374    GENLIST_PART_DISCLIP
375   }
376   programs {
377      program { name: "go_active";
378         signal: "elm,state,selected";
379         source: "elm";
380         action: STATE_SET "selected" 0.0;
381         target: "bg_image";
382      }
383      program { name: "go_passive";
384         signal: "elm,state,unselected";
385         source: "elm";
386         action: STATE_SET "default" 0.0;
387         target: "bg_image";
388         transition: LINEAR 0.1;
389      }
390      program { name: "go_disabled";
391         signal: "elm,state,disabled";
392         source: "elm";
393         action: STATE_SET "disabled" 0.0;
394         target: "disclip";
395      }
396      program { name: "go_enabled";
397         signal: "elm,state,enabled";
398         source: "elm";
399         action: STATE_SET "default" 0.0;
400         target: "disclip";
401      }
402   }
403 }
404
405
406 group { name: "elm/genlist/item/video_list_edit/gallery/default";
407   alias: "elm/genlist/item_odd/video_list_edit/gallery/default";
408
409   //data.item: "stacking" "above";
410   //data.item: "selectraise" "on";
411   data.item: "texts" "elm.text.title elm.text.duration";
412   data.item: "contents" "elm.swallow.checkbox elm.icon elm.videoicon elm.bookmarkicon elm.favourites.icon elm.progressbar.icon";
413
414   //data.item: "treesize" "20";
415   parts {
416      GENLIST_PART_BASE( VIDEO_ITEM_H )
417      GENLIST_PART_BG_IMAGE
418      GENLIST_PART_BOTTOM_LINE_VIDEO
419      GENLIST_PART_PADDING_TOP( VIDEO_PAD_T )
420      GENLIST_PART_PADDING_BOTTOM( VIDEO_PAD_B )
421      GENLIST_PART_PADDING_LEFT( VIDEO_PAD_L )
422      GENLIST_PART_PADDING_RIGHT( VIDEO_PAD_R )
423
424 //checkbox
425      part { name: "elm.swallow.checkbox";
426         clip_to: "disclip";
427         type: SWALLOW;
428         scale: 1;
429         description { state: "default" 0.0;
430            min: VIDEO_CHECKBOX_W VIDEO_CHECKBOX_H;
431            max: VIDEO_CHECKBOX_W VIDEO_CHECKBOX_H;
432            fixed: 1 1;
433            align: 0.0 0.5;
434            rel1 {
435               relative: 1.0 0.0;
436               to_x: "elm.padding.left";
437            }
438            rel2 {
439               relative: 1.0 1.0;
440               offset: 0 0;
441               to_x: "elm.padding.left";
442            }
443         }
444      }
445      part { name: "elm.padding.icon.left";
446         type: RECT;
447         scale: 1;
448         description { state: "default" 0.0;
449            min: VIDEO_PAD_ICON_L 0;
450            fixed: 1 0;
451            rel1 {
452               relative: 1.0 0.0;
453               to_x: "elm.swallow.checkbox";
454            }
455            rel2 {
456               relative: 1.0 1.0;
457               offset: 0 0;
458               to_x: "elm.swallow.checkbox";
459            }
460            color: 0 0 0 0;
461            align: 0.0 0.0;
462         }
463      }
464      part { name: "elm.padding.icon.right";
465         type: RECT;
466         scale: 1;
467         description { state: "default" 0.0;
468            min: VIDEO_PAD_ICON_R 0;
469            fixed: 1 0;
470            rel1 {
471               relative: 1.0 0.0;
472               to_x: "elm.icon";
473            }
474            rel2 {
475               relative: 1.0 1.0;
476               offset: 0 0;
477               to_x: "elm.icon";
478            }
479            color: 0 0 0 0;
480            align: 0.0 0.0;
481         }
482      }
483      part { name: "icon_bg";
484         clip_to: "disclip";
485         type: RECT;
486         scale: 1;
487         description { state: "default" 0.0;
488            min: VIDEO_BG_W VIDEO_BG_H;
489            max: VIDEO_BG_W VIDEO_BG_H;
490            fixed: 1 1;
491            align: 0.0 0.5;
492            color: VIDEO_COLOR_GAP;
493            rel1 {
494               relative: 1.0 0.0;
495               to_x: "elm.padding.icon.left";
496            }
497            rel2 {
498               relative: 1.0 1.0;
499               offset: 0 0;
500               to_x: "elm.padding.icon.left";
501            }
502         }
503      }
504      part { name: "elm.icon";
505         clip_to: "disclip";
506         type: SWALLOW;
507         scale: 1;
508         description { state: "default" 0.0;
509            fixed: 1 1;
510            align: 0.5 0.5;
511            rel1 {
512               relative: (VIDEO_GAP)/VIDEO_BG_W (VIDEO_GAP)/VIDEO_BG_H;
513               to: "icon_bg";
514            }
515            rel2 {
516               relative: (VIDEO_BG_W-VIDEO_GAP+1)/VIDEO_BG_W (VIDEO_BG_H-VIDEO_GAP+1)/VIDEO_BG_H;
517               to: "icon_bg";
518            }
519         }
520      }
521      part {
522         name: "elm.videoicon";
523         type: SWALLOW;
524                 scale: 1;
525         description {
526                 state: "default" 0.0;
527                                 max: VIDEO_PLAY_W VIDEO_PLAY_H;
528                                 align: 0.95 0.95;
529                                 color: 0 0 0 0;
530                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
531                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
532         }
533         }
534         part { name: "elm.favourites.icon";
535                 type: SWALLOW;
536                 scale: 1;
537                 description {
538                         state: "default" 0.0;
539                         max: VIDEO_FAVOR_W VIDEO_FAVOR_H;
540                         align: 0.98 0.0;
541                         color: 0 0 0 0;
542                                 rel1 { relative: 0.0 0.0; to: "elm.icon"; }
543                                 rel2 { relative: 1.0 1.0; to: "elm.icon"; }
544                         }
545         }
546         part { name: "elm.padding.bookmark.top";
547             type: RECT;
548             scale: 1;
549             description {
550                state: "default" 0.0;
551                min: 0 VIDEO_PAD_BOOKMARK_T;
552                fixed: 0 1;
553                visible: 0;
554                rel2.relative: 1.0 0.0;
555                align: 0.0 0.0;
556             }
557          }
558         part { name: "elm.bookmarkicon";
559                 clip_to: "disclip";
560                 scale: 1;
561                 type: SWALLOW;
562                 description { state: "default" 0.0;
563                    min: VIDEO_BOOKMARK_W VIDEO_BOOKMARK_H;
564                    fixed: 1 1;
565                    align: 1.0 0.0;
566                    rel1 {
567                           relative: 0.0 1.0;
568                           to_x: "elm.padding.right";
569                           to_y: "elm.padding.bookmark.top";
570             }
571                    rel2 {
572                           relative: 0.0 0.0;
573                           to_x: "elm.padding.right";
574                    }
575                 }
576         }
577      part { name: "elm.progressbar.icon";
578                 clip_to: "disclip";
579                 scale: 1;
580                 type: SWALLOW;
581                 description { state: "default" 0.0;
582                    min: VIDEO_PROGRESSBAR_W VIDEO_PROGRESSBAR_H;
583                    fixed: 0 1;
584                    align: 1.0 1.0;
585                    rel1 {
586                           relative: 0.0 1.0;
587                           to_x: "elm.bookmarkicon";
588             }
589                    rel2 {
590                           relative: 1.0 0.0;
591                           to_x: "elm.bookmarkicon";
592                           to_y: "elm.padding.bottom";
593                    }
594                 }
595      }
596      part { name: "elm.text.title";
597         clip_to: "disclip";
598         type: TEXT;
599         mouse_events: 0;
600         scale: 1;
601         description { state: "default" 0.0;
602            min: 0 VIDEO_TITLE_H;
603            fixed: 0 1;
604            align: 0.0 0.0;
605            rel1 {
606               relative: 1.0 1.0;
607               to_x: "elm.padding.icon.right";
608               to_y: "elm.padding.top";
609            }
610            rel2 {
611               relative: 0.0 1.0;
612               offset: 0 0;
613               to_x: "elm.bookmarkicon";
614               to_y: "elm.padding.top";
615            }
616            color: VIDEO_COLOR_TITLE;
617            text {
618               font: "SLP:style=Roman";
619               text_class: "slp_roman";
620               size: VIDEO_FONT_TITLE;
621               min: 0 1;
622               align: 0.0 0.5;
623            }
624         }
625      }
626      part { name: "elm.text.duration";
627         clip_to: "disclip";
628         type: TEXT;
629         mouse_events: 0;
630         scale: 1;
631         description { state: "default" 0.0;
632            min: 0 VIDEO_DURATION_H;
633            fixed: 0 1;
634            align: 0.0 0.0;
635            rel1 {
636               relative: 1.0  1.0;
637               to_x: "elm.padding.icon.right";
638               to_y: "elm.text.title";
639            }
640            rel2 {
641               relative: 0 1;
642               offset: 0 0;
643               to_x: "elm.padding.right";
644               to_y: "elm.text.title";
645            }
646            color: VIDEO_COLOR_DURATION;
647            text {
648               font: "SLP:style=Medium";
649               text_class: "slp_medium";
650               size: VIDEO_FONT_DURATION;
651               min: 0 1;
652               align: 0.0 0.5;
653            }
654         }
655      }
656
657    GENLIST_PART_DISCLIP
658   }
659   programs {
660      program { name: "go_active";
661         signal: "elm,state,selected";
662         source: "elm";
663         action: STATE_SET "selected" 0.0;
664         target: "bg_image";
665      }
666      program { name: "go_passive";
667         signal: "elm,state,unselected";
668         source: "elm";
669         action: STATE_SET "default" 0.0;
670         target: "bg_image";
671         transition: LINEAR 0.1;
672      }
673      program { name: "go_disabled";
674         signal: "elm,state,disabled";
675         source: "elm";
676         action: STATE_SET "disabled" 0.0;
677         target: "disclip";
678      }
679      program { name: "go_enabled";
680         signal: "elm,state,enabled";
681         source: "elm";
682         action: STATE_SET "default" 0.0;
683         target: "disclip";
684      }
685   }
686 }
687