apply FSL(Flora Software License)
[apps/home/gallery.git] / libug / libug-gallery-efl / res / edc / gallery-efl-gengrid-item-thumbview.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 THUMBNAILS_BG_COLOR             190 189 189 255
18
19 /* Grid item background size W: 14+158+6; H: 24+158 */
20 #define W               178
21 #define H               182
22
23 /* Gap between bg and icon */
24 #define GAP_BG_L         14
25 #define GAP_BG_R         6
26 #define GAP_BG_T         24
27
28 /* Gap between icon and shadow */
29 #define GAP_ICON_L         3
30 #define GAP_ICON_R         3
31 #define GAP_ICON_T         0
32 #define GAP_ICON_B         4
33
34 /* Shadow image size */
35 #define SHADOW_W               (W-GAP_BG_L-GAP_BG_R+GAP_ICON_L+GAP_ICON_R)
36 #define SHADOW_H               (H-GAP_BG_T+GAP_ICON_B)
37
38 /* Gap between bg and shadow */
39 #define GAP_SHADOW_L         (GAP_BG_L-GAP_ICON_L)
40 #define GAP_SHADOW_R         (GAP_BG_R-GAP_ICON_R)
41 #define GAP_SHADOW_T         (GAP_BG_T-GAP_ICON_T)
42 #define GAP_SHADOW_B         (0+GAP_ICON_B)
43
44 /* Thumbnail boundary size */
45 #define INNER         1
46
47 /* Bookmark icon boundary size */
48 #define BOOKMARK_ICON_W         30
49 #define BOOKMARK_ICON_H         38
50
51 /* Backgroud size for setting play icon position */
52 #define PLAY_BG_W         (47+64+47)
53 #define PLAY_BG_H         (27+64+28)
54 #define PLAY_W         64
55 #define PLAY_H         64
56 #define PLAY_X         47
57 #define PLAY_Y         27
58
59 group {
60         name: "elm/gengrid/item/thumbnail_view/gallery_efl/default";
61
62         data.item: "contents" "elm.swallow.icon elm.swallow.end";
63
64         parts {
65         part {
66             name: "bg";
67             type: RECT;
68             description {
69                 state: "default" 0.0;
70                 color: 0 0 0 0;
71                 rel1 { relative: 0.0 0.0; offset: 0 0;}
72                 rel2 { relative: 1.0 1.0; offset: 0 0;}
73             }
74         }
75                 part {
76                         name: "icon_bg";
77                         type: RECT;
78                         scale : 1;
79
80                         description {
81                                 state: "default" 0.0;
82                                 align: 0.5 0.5;
83                                 visible: 0;
84                                 color: 0 0 0 0;
85                                 rel1 { relative: 0.0 0.0;to:"bg"; }
86                                 rel2 { relative: 1.0 1.0;to:"bg"; }
87
88                         }
89                 }
90
91                 part {
92                         name: "elm.swallow.icon";
93                         type: SWALLOW;
94                         mouse_events: 1;
95                         description {
96                                 state: "default" 0.0;
97                                 color: 0 0 0 0;
98                                 rel1 { relative: 0.0 0.0; to: "icon_bg"; }
99                                 rel2 { relative: 1.0 1.0; to: "icon_bg"; }
100                         }
101                 }
102         part {
103             name: "elm.swallow.end";
104             type: SWALLOW;
105             description {
106                 state: "default" 0.0;
107                 rel1 { relative: 0.0 0.0; to: "elm.swallow.icon"; }
108                 rel2 { relative: 1.0 1.0; to: "elm.swallow.icon"; }
109             }
110         }
111         }
112
113         programs {
114                 program {
115                         name: "movedonw_bg";
116                         signal: "movedown,bg,show";
117                         source: "bg";
118                         action: STATE_SET "move_down" 0.0;
119                         target: "bg";
120                 }
121         }
122 }
123
124
125
126
127 group
128 {
129         name: "elm/gengrid/photoframe/default_layout";
130
131         images {
132                 image: GE_EDC_IMAGE_THUMB_BG COMP;
133         }
134
135         parts {
136                 part {
137                         name: "bg";
138                         type: RECT;
139                         description {
140                                 state: "default" 0.0;
141                                 rel1 { relative: 0.0 0.0;}
142                                 rel2 { relative: 1.0 1.0;}
143                                 color: 0 0 0 0;
144                         }
145                         description {
146                                 state: "shrink" 0.0;
147                                 rel1 { relative: 0.03 0.03;}
148                                 rel2 { relative: 0.97 0.97;}
149                                 color: 0 0 0 0;
150                         }
151                 }
152
153                 part { name: "icon_bg_img";
154                         type: IMAGE;
155                         mouse_events: 1;
156                         scale : 1;
157                         description {
158                                 state: "default" 0.0;
159                                 image {
160                                         normal : GE_EDC_IMAGE_THUMB_BG;
161                                 }
162                                 rel1 { relative: GAP_SHADOW_L/W GAP_SHADOW_T/H; to: "bg"; }
163                                 rel2 { relative: (W-GAP_SHADOW_R-1)/W (H+GAP_SHADOW_B-1)/H; to: "bg"; }
164                         }
165                 }
166                 part {
167                         name: "icon_bg";
168                         type: RECT;
169                         description {
170                                 state: "default" 0.0;
171                                 color: THUMBNAILS_BG_COLOR;
172                                 rel1 { relative: GAP_ICON_L/SHADOW_W GAP_ICON_T/SHADOW_H; to: "icon_bg_img"; }
173                                 rel2 { relative: (SHADOW_W-GAP_ICON_R+2)/SHADOW_W (SHADOW_H-GAP_ICON_B+1)/SHADOW_H; to: "icon_bg_img"; }
174                         }
175                 }
176
177                 part {
178                         name: "elm.swallow.icon";
179                         type: SWALLOW;
180                         description {
181                                 state: "default" 0.0;
182                                 rel1 { relative: (GAP_ICON_L+INNER+0.5)/SHADOW_W (GAP_ICON_T+INNER+1)/SHADOW_H; to: "icon_bg_img"; }
183                                 rel2 { relative: (SHADOW_W-GAP_ICON_R-INNER+1)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER+1)/SHADOW_H; to: "icon_bg_img"; }
184                         }
185                 }
186         }
187
188         programs {
189                 program {
190                         name: "mouse_down_shrink";
191                         signal: "mouse,down,shrink";
192                         source: "bg";
193                         action: STATE_SET "shrink" 0.0;
194                         target: "bg";
195                         //after: "expand";
196                         transition: LINEAR 0.1;
197                 }
198                 program {
199                         name: "mouse_up_expand";
200                         signal: "mouse,up,expand";
201                         source: "bg";
202                         action: STATE_SET "default" 0.0;
203                         target: "bg";
204                         transition: LINEAR 0.05;
205                         after: "shrink,expand,done,icon";
206                 }
207
208                 program {
209                         name: "shrink";
210                         signal: "shrink";
211                         source: "bg";
212                         action: STATE_SET "shrink" 0.0;
213                         target: "bg";
214                         after: "expand";
215                         transition: LINEAR 0.1;
216                 }
217                 program {
218                         name: "expand";
219                         action: STATE_SET "default" 0.0;
220                         target: "bg";
221                         transition: LINEAR 0.05;
222                         after: "shrink,expand,done,icon";
223                 }
224                 program {
225                         name: "shrink,expand,done,icon";
226                         action: SIGNAL_EMIT "shrink,expand,done" "bg";
227                 }
228         }
229 }
230
231 group
232 {
233         name: "elm/gengrid/photoframe/default_layout_video";
234         images {
235                 image: GE_EDC_IMAGE_BUTTON_PLAY COMP;
236                 image: GE_EDC_IMAGE_THUMB_BG COMP;
237         }
238
239                 parts {
240                         part {
241                         name: "bg";
242                         type: RECT;
243                         mouse_events: 1;
244                         description {
245                                 state: "default" 0.0;
246                                 rel1 { relative: 0.0 0.0;}
247                                 rel2 { relative: 1.0 1.0;}
248                                 color: 0 0 0 0;
249                         }
250                         description {
251                                 state: "shrink" 0.0;
252                                 rel1 { relative: 0.03 0.03;}
253                                 rel2 { relative: 0.97 0.97;}
254                                 color: 0 0 0 0;
255                         }
256                 }
257                 part { name: "icon_bg_img";
258                         type: IMAGE;
259                         mouse_events: 1;
260                         scale : 1;
261                         description {
262                                 state: "default" 0.0;
263                                 image {
264                                         normal : GE_EDC_IMAGE_THUMB_BG;
265                                 }
266                                 rel1 { relative: GAP_SHADOW_L/W GAP_SHADOW_T/H; to: "bg"; }
267                                 rel2 { relative: (W-GAP_SHADOW_R-1)/W (H+GAP_SHADOW_B-1)/H; to: "bg"; }
268                         }
269                 }
270                 part {
271                         name: "icon_bg";
272                         type: RECT;
273                         description {
274                         state: "default" 0.0;
275                         color: THUMBNAILS_BG_COLOR;
276                                 rel1 { relative: GAP_ICON_L/SHADOW_W GAP_ICON_T/SHADOW_H; to: "icon_bg_img"; }
277                                 rel2 { relative: (SHADOW_W-GAP_ICON_R+2)/SHADOW_W (SHADOW_H-GAP_ICON_B+1)/SHADOW_H; to: "icon_bg_img"; }
278                         }
279                 }
280
281                 part {
282                         name: "elm.swallow.icon";
283                         type: SWALLOW;
284                         description {
285                                 state: "default" 0.0;
286                                 rel1 { relative: (GAP_ICON_L+INNER+0.5)/SHADOW_W (GAP_ICON_T+INNER+1)/SHADOW_H; to: "icon_bg_img"; }
287                                 rel2 { relative: (SHADOW_W-GAP_ICON_R-INNER+1)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER+1)/SHADOW_H; to: "icon_bg_img"; }
288                         }
289                 }
290                 part {
291                         name: "elm.text.bg";
292                         type: RECT;
293                         mouse_events: 0;
294                         scale : 1;
295                         description {
296                                 state: "default" 0.0;
297                                 visible: 1;
298                                 color: 0 0 0 130;
299                                 align: 0.5 1.0;
300                                 fixed: 0 1;
301                                 rel1 { relative: (GAP_ICON_L+INNER+0.5)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER-BOOKMARK_ICON_H+1)/SHADOW_H; to: "icon_bg_img"; }
302                                 rel2 { relative: (SHADOW_W-GAP_ICON_R-INNER+1)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER+1+0.5)/SHADOW_H; to: "icon_bg_img"; }
303                         }
304                 }
305                 part {
306                         name: "elm.videoicon_bg";
307                         type: RECT;
308                         mouse_events: 0;
309                         repeat_events: 0;
310                         scale: 1;
311                         description {
312                                 state: "default" 0.0;
313                                 visible: 0;
314                                 align: 0.5 0.0;
315                                 fixed: 1 0;
316                                 rel1 { relative: 0.0 0.0; to: "elm.swallow.icon";}
317                                 rel2 { relative: 1.0 0.0; to_x: "elm.swallow.icon"; to_y: "elm.text.bg";}
318                         }
319                 }
320                 part {
321                         name: "elm.swallow.videoicon";
322                         type: IMAGE;
323                         mouse_events: 0;
324                         repeat_events: 0;
325                         scale: 1;
326                         description {
327                                 state: "default" 0.0;
328                                 visible: 1;
329                                 align: 0.5 0.5;
330                                 aspect: 1.0 1.0;
331                                 rel1 { relative: PLAY_X/PLAY_BG_W PLAY_Y/PLAY_BG_H; to: "elm.videoicon_bg";}
332                                 rel2 { relative: (PLAY_X+PLAY_W)/PLAY_BG_W (PLAY_Y+PLAY_H)/PLAY_BG_H; to: "elm.videoicon_bg";}
333                                 image.normal: GE_EDC_IMAGE_BUTTON_PLAY;
334                         }
335                 }
336                 part {
337                         name: "elm.text";
338                         type: TEXT;
339                         mouse_events: 1;
340                         repeat_events: 1;
341                         scale: 1;
342                         description {
343                                 state: "default" 0.0;
344                                 fixed: 1 1;
345                                 align: 0.5 0.0;
346                                 rel1 { relative: 0.0  0.0; to: "elm.text.bg"; }
347                                 rel2 { relative: 1.0  1.0; to: "elm.text.bg"; }
348                                 color: 255 255 255 255;
349                                 text {
350                                         font: "HelveticaNeue:style=Medium";
351                                         size: 26;
352                                         align: 0.5 0.5;
353                                 }
354                         }
355                 }
356         }
357         programs {
358                 program {
359                         name: "mouse_down_shrink";
360                         signal: "mouse,down,shrink";
361                         source: "bg";
362                         action: STATE_SET "shrink" 0.0;
363                         target: "bg";
364                         //after: "expand";
365                         transition: LINEAR 0.1;
366                 }
367                 program {
368                         name: "mouse_up_expand";
369                         signal: "mouse,up,expand";
370                         source: "bg";
371                         action: STATE_SET "default" 0.0;
372                         target: "bg";
373                         transition: LINEAR 0.05;
374                         after: "shrink,expand,done,icon";
375                 }
376
377                 program {
378                         name: "shrink";
379                         signal: "shrink";
380                         source: "bg";
381                         action: STATE_SET "shrink" 0.0;
382                         target: "bg";
383                         after: "expand";
384                         transition: LINEAR 0.1;
385                 }
386                 program {
387                         name: "expand";
388                         action: STATE_SET "default" 0.0;
389                         target: "bg";
390                         transition: LINEAR 0.05;
391                         after: "shrink,expand,done,icon";
392                 }
393                 program {
394                         name: "shrink,expand,done,icon";
395                         action: SIGNAL_EMIT "shrink,expand,done" "bg";
396                 }
397         }
398 }
399
400 group
401 {
402         name: "elm/gengrid/photoframe/default_layout_video_bookmark";
403         images {
404                 image: GE_EDC_IMAGE_BUTTON_PLAY COMP;
405                 image: GE_EDC_IMAGE_THUMB_BG COMP;
406         }
407
408         parts {
409                 part {
410                         name: "bg";
411                         type: RECT;
412                         mouse_events: 1;
413                         description {
414                                 state: "default" 0.0;
415                                 rel1 { relative: 0.0 0.0;}
416                                 rel2 { relative: 1.0 1.0;}
417                                 color: 0 0 0 0;
418                         }
419                         description {
420                                 state: "shrink" 0.0;
421                                 rel1 { relative: 0.03 0.03;}
422                                 rel2 { relative: 0.97 0.97;}
423                                 color: 0 0 0 0;
424                         }
425                 }
426                 part { name: "icon_bg_img";
427                         type: IMAGE;
428                         mouse_events: 1;
429                         scale : 1;
430                         description {
431                                 state: "default" 0.0;
432                                 image {
433                                         normal : GE_EDC_IMAGE_THUMB_BG;
434                                 }
435                                 rel1 { relative: GAP_SHADOW_L/W GAP_SHADOW_T/H; to: "bg"; }
436                                 rel2 { relative: (W-GAP_SHADOW_R-1)/W (H+GAP_SHADOW_B-1)/H; to: "bg"; }
437                         }
438                 }
439                 part {
440                         name: "icon_bg";
441                         type: RECT;
442                         description {
443                                 state: "default" 0.0;
444                                 color: THUMBNAILS_BG_COLOR;
445                                 rel1 { relative: GAP_ICON_L/SHADOW_W GAP_ICON_T/SHADOW_H; to: "icon_bg_img"; }
446                                 rel2 { relative: (SHADOW_W-GAP_ICON_R+2)/SHADOW_W (SHADOW_H-GAP_ICON_B+1)/SHADOW_H; to: "icon_bg_img"; }
447                         }
448                 }
449
450                 part {
451                         name: "elm.swallow.icon";
452                         type: SWALLOW;
453                         description {
454                                 state: "default" 0.0;
455                                 rel1 { relative: (GAP_ICON_L+INNER+0.5)/SHADOW_W (GAP_ICON_T+INNER+1)/SHADOW_H; to: "icon_bg_img"; }
456                                 rel2 { relative: (SHADOW_W-GAP_ICON_R-INNER+1)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER+1)/SHADOW_H; to: "icon_bg_img"; }
457                         }
458                 }
459                 part {
460                         name: "elm.text.bg";
461                         type: RECT;
462                         mouse_events: 0;
463                         scale : 1;
464
465                         description {
466                                 state: "default" 0.0;
467                                 visible: 1;
468                                 color: 0 0 0 130;
469                                 min: 0 24;
470                                 align: 0.5 1.0;
471                                 fixed: 0 1;
472                                 rel1 { relative: (GAP_ICON_L+INNER+0.5)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER-BOOKMARK_ICON_H+1)/SHADOW_H; to: "icon_bg_img"; }
473                                 rel2 { relative: (SHADOW_W-GAP_ICON_R-INNER+1)/SHADOW_W (SHADOW_H-GAP_ICON_B-INNER+1+0.5)/SHADOW_H; to: "icon_bg_img"; }
474                         }
475                 }
476                 part {
477                         name: "elm.videoicon_bg";
478                         type: RECT;
479                         mouse_events: 0;
480                         repeat_events: 0;
481                         scale: 1;
482                         description {
483                                 state: "default" 0.0;
484                                 visible: 0;
485                                 align: 0.5 0.0;
486                                 fixed: 1 0;
487                                 rel1 { relative: 0.0 0.0; to: "elm.swallow.icon";}
488                                 rel2 { relative: 1.0 0.0; to_x: "elm.swallow.icon"; to_y: "elm.text.bg";}
489                         }
490                 }
491                 part {
492                         name: "elm.swallow.videoicon";
493                         type: IMAGE;
494                         mouse_events: 0;
495                         repeat_events: 0;
496                         scale: 1;
497                         description {
498                                 state: "default" 0.0;
499                                 min: 40 40;
500                                 visible: 1;
501                                 align: 0.5 0.5;
502                                 aspect: 1.0 1.0;
503                                 rel1 { relative: PLAY_X/PLAY_BG_W PLAY_Y/PLAY_BG_H; to: "elm.videoicon_bg";}
504                                 rel2 { relative: (PLAY_X+PLAY_W)/PLAY_BG_W (PLAY_Y+PLAY_H)/PLAY_BG_H; to: "elm.videoicon_bg";}
505                                 image.normal: GE_EDC_IMAGE_BUTTON_PLAY;
506                         }
507                 }
508                 part {
509                         name: "bookmarkicon_bg";
510                         type: RECT;
511                         scale: 1;
512                         description {
513                                 state: "default" 0.0;
514                                 min: BOOKMARK_ICON_W BOOKMARK_ICON_H;
515                                 max: BOOKMARK_ICON_W BOOKMARK_ICON_H;
516                                 align: 0.0 0.5;
517                                 fixed: 1 1;
518                                 visible: 0;
519                                 rel1 { relative: 0.0 0.0; to: "elm.text.bg"; }
520                                 rel2 { relative: 0.0 1.0; to: "elm.text.bg"; }
521                         }
522                 }
523                 part {
524                         name: "elm.swallow.bookmarkicon";
525                         type: SWALLOW;
526                         scale: 1;
527                         description {
528                                 state: "default" 0.0;
529                                 align: 0.5 0.5;
530                                 visible: 1;
531                                 rel1 { relative: 0.0 0.0; to: "bookmarkicon_bg"; }
532                                 rel2 { relative: 1.0 1.0; to: "bookmarkicon_bg"; }
533                         }
534                 }
535                 part {
536                         name: "elm.text";
537                         type: TEXT;
538                         mouse_events: 1;
539                         repeat_events: 1;
540                         scale: 1;
541                         description {
542                                 state: "default" 0.0;
543                                 min: 0 20;
544                                 fixed: 1 1;
545                                 align: 0.5 0.5;
546                                 rel1 { relative: 0.9  0.0; to_x: "elm.swallow.bookmarkicon"; to_y: "elm.text.bg"; }
547                                 rel2 { relative: 1.0  1.0; to: "elm.text.bg"; }
548                                 color: 255 255 255 255;
549                                 text {
550                                         font: "HelveticaNeue:style=Medium";
551                                         size: 26;
552                                         align: 0.5 0.5;
553                                 }
554                         }
555                 }
556         }
557         programs {
558                 program {
559                         name: "mouse_down_shrink";
560                         signal: "mouse,down,shrink";
561                         source: "bg";
562                         action: STATE_SET "shrink" 0.0;
563                         target: "bg";
564                         //after: "expand";
565                         transition: LINEAR 0.1;
566                 }
567                 program {
568                         name: "mouse_up_expand";
569                         signal: "mouse,up,expand";
570                         source: "bg";
571                         action: STATE_SET "default" 0.0;
572                         target: "bg";
573                         transition: LINEAR 0.05;
574                         after: "shrink,expand,done,icon";
575                 }
576
577                 program {
578                         name: "shrink";
579                         signal: "shrink";
580                         source: "bg";
581                         action: STATE_SET "shrink" 0.0;
582                         target: "bg";
583                         after: "expand";
584                         transition: LINEAR 0.1;
585                 }
586                 program {
587                         name: "expand";
588                         action: STATE_SET "default" 0.0;
589                         target: "bg";
590                         transition: LINEAR 0.05;
591                         after: "shrink,expand,done,icon";
592                 }
593                 program {
594                         name: "shrink,expand,done,icon";
595                         action: SIGNAL_EMIT "shrink,expand,done" "bg";
596                 }
597         }
598 }