apply FSL(Flora Software License)
[apps/home/gallery.git] / libug / libug-gallery-efl / res / edc / gallery-efl-gengrid-item-albums.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 /* 14 + 334 + 10 */
18 #define ALBUM_ITEM_W 358
19 /* 26 + 334 */
20 #define ALBUM_ITEM_H 360
21
22 #define ALBUM_W 334
23 #define ALBUM_H 334
24
25 #define ALBUM_GAP_L 12
26 #define ALBUM_GAP_R 12
27 #define ALBUM_GAP_T 26
28
29 #define ALBUM_ICON_W 318
30 #define ALBUM_ICON_H 318
31
32 #define ALBUM_ICON_GAP_L 8
33 #define ALBUM_ICON_GAP_R 8
34 #define ALBUM_ICON_GAP_B 16
35 #define ALBUM_ICON_PAD 3
36
37 #define ALBUM_TEXT_AREA_W 207
38 #define ALBUM_TEXT_AREA_H 102
39 #define ALBUM_TEXT_GAP_L 4
40 #define ALBUM_TEXT_GAP_R 4
41 #define ALBUM_TEXT_Y 60
42 #define ALBUM_TEXT_NAME_H 32
43 #define ALBUM_TEXT_DATE_H 25
44
45 #define ALBUM_RENAME_BTN_W 64
46 #define ALBUM_RENAME_BTN_H 64
47
48 #define ALBUM_CHECKBOX_W 42
49 #define ALBUM_CHECKBOX_H 42
50 #define ALBUM_CHECKBOX_GAP_L 1
51 #define ALBUM_CHECKBOX_GAP_T 8
52
53
54 group {
55         name: "elm/gengrid/item/albums_view/gallery_efl/default";
56
57         data.item: "texts" "elm.text.name elm.text.date elm.text.count";
58         data.item: "contents" "elm.swallow.firsticon elm.swallow.icon elm.swallow.onlyicon elm.swallow.check_bg label_bg";
59
60     images {
61                 image: GE_EDC_IMAGE_MAIN_FOLDER_BG COMP;
62         }
63
64         parts {
65                 part {
66                         name: "bg";
67                         type: RECT;
68                         description {
69                         state: "default" 0.0;
70                                 color: 255 0 0 0;
71                                         rel1 { relative: 0.0 0.0; }
72                                         rel2 { relative: 1.0 1.0; }
73                         }
74                 }
75                 part { name: "icon_bg_img";
76                         type: IMAGE;
77                         mouse_events: 1;
78                         scale : 1;
79                         description {
80                                 min : ALBUM_W ALBUM_H;
81                                 state: "default" 0.0;
82                                 image {
83                                         normal : GE_EDC_IMAGE_MAIN_FOLDER_BG;
84                                 }
85                                 rel1 { relative: ALBUM_GAP_L/ALBUM_ITEM_W ALBUM_GAP_T/ALBUM_ITEM_H; to:"bg"; }
86                                 rel2 { relative: (ALBUM_ITEM_W-ALBUM_GAP_R-1)/ALBUM_ITEM_W 1.0; to:"bg"; }
87                         }
88                 }
89                 part { name: "icon_bg";
90                         type: RECT;
91                         mouse_events: 1;
92                         scale : 1;
93                         description {
94                                 min : ALBUM_ICON_W ALBUM_ICON_H;
95                                 state: "default" 0.0;
96                                 rel1 { relative: ALBUM_ICON_GAP_L/ALBUM_ICON_W 0.0; to:"icon_bg_img"; }
97                                 rel2 { relative: (ALBUM_ICON_W-ALBUM_ICON_GAP_R+2)/ALBUM_ICON_W (ALBUM_ICON_H-ALBUM_ICON_GAP_B+2)/ALBUM_ICON_H; to:"icon_bg_img"; }
98                         }
99                 }
100                 part {
101                         name: "elm.swallow.onlyicon";
102                         type: SWALLOW;
103                         mouse_events: 1;
104                         repeat_events: 1;
105                         description {
106                                         state: "default" 0.0;
107                                         rel1 { relative: (ALBUM_ICON_PAD/ALBUM_ICON_W) (ALBUM_ICON_PAD/ALBUM_ICON_H); to: "icon_bg"; }
108                                         rel2 { relative: (ALBUM_ICON_W-ALBUM_ICON_PAD)/ALBUM_ICON_W (ALBUM_ICON_H-ALBUM_ICON_PAD)/ALBUM_ICON_H; to: "icon_bg"; }
109                         }
110         }
111                 part {
112                         name: "label_bg";
113                         type: SWALLOW;
114             mouse_events: 1;
115             repeat_events: 1;
116                         description {
117                                 state: "default" 0.0;
118                                 rel1 { relative: (ALBUM_ICON_PAD/ALBUM_ICON_W) (ALBUM_ICON_PAD/ALBUM_ICON_H); offset: 0 0; to: "icon_bg"; }
119                                 rel2 { relative: ((ALBUM_ICON_PAD+ALBUM_TEXT_AREA_W-1)/ALBUM_ICON_W) ((ALBUM_ICON_PAD+ALBUM_TEXT_AREA_H-1)/ALBUM_ICON_H); offset: 0 0; to: "icon_bg"; }
120                         }
121                 }
122                 part {
123                         name: "elm.swallow.firsticon";
124                         type: SWALLOW;
125                         mouse_events: 1;
126                         repeat_events: 1;
127                         description {
128                                 state: "default" 0.0;
129                                 rel1 { relative: ((ALBUM_ICON_PAD+ALBUM_TEXT_AREA_W+ALBUM_ICON_PAD)/ALBUM_ICON_W) (ALBUM_ICON_PAD/ALBUM_ICON_H); to: "icon_bg"; }
130                                 rel2 { relative: (ALBUM_ICON_W-ALBUM_ICON_PAD)/ALBUM_ICON_W (ALBUM_TEXT_AREA_H+ALBUM_ICON_PAD)/ALBUM_ICON_H; to: "icon_bg"; }
131                         }
132         }
133                 part {
134                         name: "elm.swallow.icon";
135                         type: SWALLOW;
136                         mouse_events: 1;
137                         repeat_events: 1;
138                         description {
139                                                 state: "default" 0.0;
140                                                 rel1 { relative: (ALBUM_ICON_PAD/ALBUM_ICON_W) ((ALBUM_ICON_PAD+ALBUM_TEXT_AREA_H+ALBUM_ICON_PAD)/ALBUM_ICON_H); to: "icon_bg"; }
141                                                 rel2 { relative: (ALBUM_ICON_W-ALBUM_ICON_PAD)/ALBUM_ICON_W (ALBUM_ICON_H-ALBUM_ICON_PAD)/ALBUM_ICON_H; to: "icon_bg"; }
142                         }
143         }
144                 part {
145                         name: "edit_text_bg";
146                         type: RECT;
147                 mouse_events: 1;
148                 repeat_events: 1;
149                         description {
150                                 state: "default" 0.0;
151                                 visible: 0;
152                         rel1 { relative: 0.0  0.0; to: "label_bg"; }
153                         rel2 { relative: 1.0  1.0; to: "label_bg"; }
154                                 color: 100 100 100 100;
155                         }
156                         description {
157                                 state: "show" 0.0;
158                                 inherit: "default" 0.0;
159                                 visible: 1;
160                         }
161                 }
162         part {
163                         name: "elm.text.date";
164                         type: TEXT;
165                         mouse_events: 1;
166                         repeat_events: 1;
167                         scale: 1;
168                         description {
169                                 state: "default" 0.0;
170                                 rel1 { relative: ALBUM_TEXT_GAP_L/ALBUM_TEXT_AREA_W  ALBUM_TEXT_NAME_H/ALBUM_TEXT_AREA_H; to: "label_bg"; }
171                                 rel2 { relative: (ALBUM_TEXT_AREA_W-ALBUM_TEXT_GAP_L-1)/ALBUM_TEXT_AREA_W  (ALBUM_TEXT_NAME_H+ALBUM_TEXT_DATE_H-1)/ALBUM_TEXT_AREA_H; to: "label_bg"; }
172                                         color: 190 190 190 255;
173                                 text {
174                                         font: "Helvetica Neue:style=Medium";
175                                         size: 22;
176                                         align: 0.0 0.5;
177                                 }
178                         }
179         }
180                 part {
181                         name: "elm.text.count";
182                         type: TEXT;
183                         mouse_events: 1;
184                         repeat_events: 1;
185                         scale: 1;
186                         description {
187                                 state: "default" 0.0;
188                                 visible: 1;
189                                 rel1 { relative: ((ALBUM_TEXT_GAP_L+1)/ALBUM_TEXT_AREA_W)  ALBUM_TEXT_Y/ALBUM_TEXT_AREA_H; to: "label_bg"; }
190                                 rel2 { relative: (ALBUM_TEXT_AREA_W-ALBUM_TEXT_GAP_L-1)/ALBUM_TEXT_AREA_W  1.0; to: "label_bg"; }
191                                 color: 255 255 255 255;
192                                 text {
193                                         font: "Helvetica Neue:style=Medium";
194                                         size: 38;
195                                         align: 1.0 0.5;
196                                 }
197                         }
198                         description {
199                                                 state: "hide" 0.0;
200                                                 inherit: "default" 0.0;
201                                                 visible: 0;
202                                         }
203         }
204                 part {
205                         name: "selected_bg";
206                         type: RECT;
207                         description {
208                 state: "default" 0.0;
209                                 visible: 0;
210                 rel1 { relative: 0.0 0.0; to: "elm.swallow.icon"; }
211                 rel2 { relative: 1.0 1.0; to: "elm.swallow.icon"; }
212             }
213                         description {
214                                 state: "selected" 0.0;
215                                 inherit: "default" 0.0;
216                                 visible: 0;
217                         }
218                 }
219         part {
220                         name: "elm.swallow.check_bg";
221                         type: SWALLOW;
222             mouse_events: 1;
223                         description {
224                                 state: "default" 0.0;
225                                 rel1 { relative: (ALBUM_ICON_PAD/ALBUM_ICON_W) (ALBUM_ICON_PAD/ALBUM_ICON_H); offset: 0 0; to: "icon_bg"; }
226                                 rel2 { relative: ((ALBUM_ICON_W-ALBUM_ICON_PAD-1)/ALBUM_ICON_W) ((ALBUM_ICON_H-ALBUM_ICON_PAD-1)/ALBUM_ICON_H); offset: 0 0; to: "icon_bg"; }
227                         }
228                 }
229                 part {
230                         name: "elm.text.name";
231                         type: TEXT;
232                         mouse_events: 1;
233                         repeat_events: 1;
234                         scale: 1;
235                         description {
236                                 state: "default" 0.0;
237                                                 rel1 { relative: (ALBUM_TEXT_GAP_L/ALBUM_TEXT_AREA_W) 0.0; to: "label_bg"; }
238                                                 rel2 { relative: (ALBUM_TEXT_AREA_W-ALBUM_TEXT_GAP_L-1)/ALBUM_TEXT_AREA_W (ALBUM_TEXT_NAME_H-1)/ALBUM_TEXT_AREA_H; to: "label_bg"; }
239                                         color: 255 255 255 255;
240                                 text {
241                                         font: "Helvetica Neue:style=Medium";
242                                         size: 28;
243                                         align: 0.0 0.5;
244                                 }
245                         }
246                                         description {
247                                                 state: "blue" 0.0;
248                                                 inherit: "default" 0.0;
249                                                 color: 111 198 235 255;
250                                         }
251                                 }
252         }
253
254       programs {
255                 program {
256                 name: "go_active";
257                 signal: "elm,state,selected";
258                 source: "elm";
259                 action: STATE_SET "selected" 0.0;
260                 target: "selected_bg";
261         }
262         program {
263                 name: "go_passive";
264                 signal:  "elm,state,unselected";
265                 source:  "elm";
266                 action:  STATE_SET "default" 0.0;
267                 target:  "selected_bg";
268         }
269                 program {       /* Show blue name */
270                         name: "show_blue_name";
271                         signal: "elm,name,show,blue";
272                         source: "elm";
273                        script {
274                            set_state(PART:"elm.text.name", "blue", 0.0);
275                         }
276                 }
277         }
278 }
279