c8f6ede6543eabdb5ad69acb597f1d7616decdf7
[apps/home/gallery.git] / res / edc / gallery.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 FONT_ROM       "HelveticaNeue:style=Roman"
18 #define FONT_MED       "HelveticaNeue:style=Medium"
19 #define INDICATOR_H     27
20 #define NAVI_H          67
21 #define GALLERY_EDC_COLOR_THEME_GRAY  91 91 91 255
22 #define GALLERY_EDC_COLOR_BG  45 45 45 255
23 #define ENTRY_H         112
24 #define ENTRY_MAX_W             1280
25 #define CONTROLBAR_LARGE_HEIGHT_INC 117
26 #define CONTROLBAR_SMALL_HEIGHT_INC 98
27
28 #include "gallery-edc-res.h"
29
30 collections {
31 #include "gl-selection-notification.edc"
32 #include "gl-genlist-item-video.edc"
33 #include "gl-gengrid-item-thumbview.edc"
34 #include "gl-gengrid-item-albums.edc"
35 #include "gl-button.edc"
36 #include "gl-segment.edc"
37 #include "gl-entry.edc"
38 #include "gl-editfield.edc"
39 #include "gl-check.edc"
40 #include "gl-nocontents.edc"
41
42         group {
43                 name: "gallery/view_layout";
44                 parts {
45                         part {
46                                 name: "background";
47                                 type, RECT;
48                                 mouse_events: 0;
49                                 description {
50                                 state: "default" 0.0;
51                                 rel1 { relative: 0.0 0.0; offset: 0 0; }
52                                 rel2 { relative: 1.0 1.0; offset: -1 -1; }
53                                 color, 0 0 0 0 ;
54                                 }
55
56                         }
57
58                         part {
59                                 name: "selectall_bg";
60                                 type: RECT;
61                                 mouse_events: 1;
62                                 scale: 1;
63                                 description {
64                                         state: "default" 0.0;
65                                         min: 0 112;
66                                         fixed: 0 1;
67                                         align: 0.5 0.0;
68                                         rel1 { relative: 0.0 0.0; to: "background"; }
69                                         rel2 { relative: 1.0 0.0; to: "background"; }
70                                         color: 0 0 0 0;
71                                 }
72                                 description {
73                                         state: "visible" 0.0;
74                                         inherit: "default" 0.0;
75                                         color: 37 37 37 153;
76                                 }
77                                 description {
78                                         state: "visible_video" 0.0;
79                                         inherit: "default" 0.0;
80                                         min: 0 VIDEO_SELECT_ALL_ITEM_H;
81                                         color: 37 37 37 153;
82                                 }
83                         }
84                         part {
85                                 name: "selectall_bottom_line";
86                                 type: RECT;
87                                 mouse_events: 1;
88                                 scale: 1;
89                                 description {
90                                         state: "default" 0.0;
91                                         min: 0 2;
92                                         fixed: 0 1;
93                                         align: 0.5 0.0;
94                                         rel1 { relative: 0.0 1.0; to: "selectall_bg"; }
95                                         rel2 { relative: 1.0 0.0; to: "background"; }
96                                         color: 0 0 0 0;
97                                 }
98                                 description {
99                                         state: "visible" 0.0;
100                                         inherit: "default" 0.0;
101                                         color: GENLIST_PART_BOTTOM_LINE_COLOR_VIDEO;
102                                 }
103                                 description {
104                                         state: "visible_video" 0.0;
105                                         inherit: "default" 0.0;
106                                         color: GENLIST_PART_BOTTOM_LINE_COLOR_VIDEO;
107
108                                 }
109                         }
110                         part {
111                         name: "selectall_check_leftpadding";
112                         type: RECT;
113                         mouse_events: 0;
114                         scale: 1;
115                         description {
116                                 state: "default" 0.0;
117                                 min: 16 0;
118                                 fixed: 1 0;
119                                 align: 0.0 0.0;
120
121                                 color: 0 0 0 255;
122                                 visible: 0;
123                                 rel1 { relative: 0.0 0.0; to: "selectall_bg"; }
124                                 rel2 { relative: 0.0 1.0; to: "selectall_bg"; }
125                         }
126                         description {
127                                 state: "visible" 0.0;
128                                 inherit: "default" 0.0;
129
130                         }
131
132                 }
133
134                 part {
135                         name: "selectall_check";
136                         type: SWALLOW;
137                         mouse_events: 1;
138                         scale: 1;
139                         description {
140                                 state: "default" 0.0;
141                                 align: 0.0 0.5;
142                                 fixed: 1 1;
143                                 min: 42 42;
144                                 rel1 { relative: 1.0 0.0; to: "selectall_check_leftpadding"; }
145                                 rel2 { relative: 1.0 1.0; to: "selectall_check_leftpadding"; }
146                                 visible : 0;
147
148                         }
149                         description {
150                                 state: "visible" 0.0;
151                                 inherit: "default" 0.0;
152                                 visible: 1;
153                         }
154
155                 }
156
157                 part {
158                         name: "selectall_check_rightpadding";
159                         type: RECT;
160                         mouse_events: 0;
161                         scale: 1;
162                         description {
163                                 state: "default" 0.0;
164                                 min: 16 0;
165                                 fixed: 1 0;
166                                 align: 0.0 0.0;
167                                 color: 0 0 0 0;
168                                 rel1 { relative: 1.0 0.0; to: "selectall_check"; }
169                                 rel2 { relative: 1.0 1.0; to: "selectall_check"; }
170                                  visible: 0;
171                         }
172                         description {
173                                 state: "visible" 0.0;
174                                 inherit: "default" 0.0;
175                                 visible: 1;
176                         }
177
178                 }
179
180                 part {
181                         name: "selectall_text";
182                         type: TEXT;
183                         mouse_events: 0;
184                         scale: 1;
185                         description {
186                                 state: "default" 0.0;
187                                 align: 0.0 0.5;
188                                 rel1 { relative: 1.0 0.0; to: "selectall_check_rightpadding"; }
189                                 rel2 { relative: 1.0 1.0; to: "selectall_bg"; }
190                                 color: 255 255 255 255;
191                                 text {
192                                         font: "Helvetica Neue:style=Medium";
193                                         size: 44;
194                                         text: "";
195                                         align: 0.0 0.5;
196                                 }
197                                 visible: 0;
198                         }
199                         description {
200                                 state: "visible" 0.0;
201                                 inherit: "default" 0.0;
202                                 visible: 1;
203                         }
204                 }
205
206                 part {
207                         name: "selectall_inner";
208                         type: RECT;
209                         mouse_events: 0;
210                         scale: 1;
211
212                         description {
213                                 state: "defalut" 0.0;
214                                 min: 0 1;
215                                 fixed: 0 1;
216                                 align: 0.5 0.0;
217                                 rel1 { relative: 0.0 1.0; to: "selectall_bg"; }
218                                 rel2 { relative: 1.0 1.0; to: "selectall_bottom_line"; }
219                                 color: 90 90 90 0;
220                         }
221                         description {
222                                 state: "visible" 0.0;
223                                 inherit: "default" 0.0;
224                         }
225                 }
226                 part {
227                         name: "elm.padding.selinfo";
228                         type: RECT;
229                         scale: 1;
230                         description {
231                                         state: "default" 0.0;
232                                         min: 0 SELINFO_H; // bottom padding size for selectioninfo
233                                         fixed: 0 1;
234                                         align: 0.5 1.0;
235                                         rel1 { relative: 0.0 1.0; }
236                                         rel2 { relative: 1.0 1.0; }
237                                         color: 0 0 0 0;
238                                         visible: 0;
239                         }
240                 }
241                 part {
242                         name: "elm.swallow.view";
243                         type: SWALLOW;
244                         mouse_events: 1;
245                         description {
246                                 state: "default" 0.0;
247                                 rel1 { relative: 0.0 0.0;}
248                                 rel2 { relative: 1.0 1.0; }
249                         }
250                         description { //edit thumbnails view
251                                 state: "thumb_edit_default" 0.0;
252                                 rel1 { relative: 0.0 1.0; to: "selectall_inner"; }
253                                 rel2 { relative: 1.0 1.0;}
254
255                         }
256                         description { //move edit thumbnails view up while selectioninfo shown
257                                 state: "moveup_view" 0.0;
258                                 rel1 { relative: 0.0 1.0; to: "selectall_inner"; }
259                                 rel2 { relative: 1.0 0.0; to: "elm.padding.selinfo"; }
260
261                         }
262                         description { //move edit albums view up while selectioninfo shown
263                                 state: "moveup_albums_default" 0.0;
264                                 rel1 { relative: 0.0 0.0; }
265                                 rel2 { relative: 1.0 0.0; to: "elm.padding.selinfo"; }
266                         }
267                 }
268         }
269
270         programs
271         {
272                 program {
273                         name: "selectall_show_after";
274                         action: STATE_SET "visible" 0.0;
275                         target: "selectall_check_leftpadding";
276                         target: "selectall_check";
277                         target: "selectall_check_rightpadding";
278                         target: "selectall_text";
279                         target: "selectall_inner";
280                 }
281                 program {
282                         name: "selectall_show";
283                         signal: "selectall_show";
284                         source: "elm";
285                         action: STATE_SET "visible" 0.0;
286                         target: "selectall_bg";
287                         target: "selectall_bottom_line";
288                     after: "selectall_show_after";
289                 }
290                 program {
291                         name: "selectall_show_video";
292                         signal: "selectall_show_video";
293                         source: "elm";
294                         action: STATE_SET "visible_video" 0.0;
295                         target: "selectall_bg";
296                         target: "selectall_bottom_line";
297                     after: "selectall_show_after";
298                 }
299                 program {
300                         name: "selectall_hide";
301                         signal: "selectall_hide";
302                         source: "elm";
303                         action: STATE_SET "default" 0.0;
304                         target: "selectall_bg";
305                         target: "selectall_bottom_line";
306                         target: "selectall_check_leftpadding";
307                         target: "selectall_check";
308                         target: "selectall_check_rightpadding";
309                         target: "selectall_text";
310                         target: "selectall_inner";
311                 }
312                 //emit signal to set checkbox state in .c codes
313                 program { name: "selectall_bg_click2";
314                         signal: "mouse,clicked,1";
315                         source: "selectall_bg";
316                         action: SIGNAL_EMIT "elm,action,click" "selectall_bg";
317                 }
318
319                 program {
320                         name: "swallow_view_default";
321                         signal: "elm,swallow_view,state,default";
322                         source: "elm";
323                         script {
324                                 set_state(PART:"elm.swallow.view", "default", 0.0);
325                         }
326                 }
327                 program {
328                         name: "swallow_view_thumb_edit_default";
329                         signal: "elm,swallow_view,state,thumb_edit_default";
330                         source: "elm";
331                         script {
332                                 set_state(PART:"elm.swallow.view", "thumb_edit_default", 0.0);
333                         }
334                 }
335                 program {
336                         name: "swallow_view_moveup_view";
337                         signal: "elm,swallow_view,state,moveup_view";
338                         source: "elm";
339                         script {
340                                 set_state(PART:"elm.swallow.view", "moveup_view", 0.0);
341                         }
342                 }
343                 program {
344                         name: "swallow_view_moveup_albums_default";
345                         signal: "elm,swallow_view,state,moveup_albums_default";
346                         source: "elm";
347                         script {
348                                 set_state(PART:"elm.swallow.view", "moveup_albums_default", 0.0);
349                         }
350                 }
351         }
352
353  }
354
355 //edit field layout
356       group {
357                 name: "gallery/entry";
358                 parts{
359                         part {
360                                 name: "bg";
361                                 type: RECT;
362                                 mouse_events: 1;
363                                 scale:1;
364
365                                 description {
366                                         state: "default" 0.0;
367                                         color: GALLERY_EDC_COLOR_BG;
368                                         rel1.relative: 0.0 0.0;
369                                         rel2.relative: 1.0 1.0;
370                                 }
371                         }
372                          part {
373                                 name: "bg_entry";
374                                 type: RECT;
375                                 mouse_events: 0;
376                                 scale:1;
377
378                                 description {
379                                         state: "default" 0.0;
380                                         min: 0 ENTRY_H;//0 112 //0 76
381                                         max: ENTRY_MAX_W ENTRY_H;//1280 112  //800 76
382                                         fixed:1 1;
383                                         rel1 { relative: 0.0  0.0; to: "bg";}
384                                         rel2 { relative: 1.0  0.0; to: "bg"; offset: 0 ENTRY_H;}        //112   64
385                                         color: 0 0 0 0; //Fixme, set bg transparent.
386                                         //color: 255 255 255 255;
387                                         align: 0 0;
388                                 }
389                         }
390                         part {
391                                 name: "botton_line";
392                                 type: RECT;
393                                 mouse_events: 0;
394                                 scale:1;
395
396                                 description {
397                                         min : 0 1; //minimum size for gap filler
398                                         fixed: 1 1;
399                                         state: "default" 0.0;
400                                         rel1 { relative: 0.0 1.0; to: "bg_entry";}
401                                         rel2 { relative: 1.0 1.0; to: "bg_entry"; offset: 0 1;}
402                                         color: 82 82 82 255;
403                                         align: 0 0;
404                                 }
405                         }
406                         part {
407                                 name: "entry_part";
408                                 type: SWALLOW;
409                                 mouse_events: 1;
410                                 scale:1;
411
412                                 description {
413                                         min : 0 56; //minimum size for gap filler
414                                         max: 5000 56;
415                                         fixed: 1 1;
416                                         state: "default" 0.0;
417                                         rel1 { relative: 0.0 0.0; to: "bg_entry"; offset: 10 0;}
418                                         rel2 { relative: 1.0 (56/76); to: "bg_entry"; offset: -12 0;}
419                                         align: 0 0;
420                                 }
421                         }
422                 }
423         }
424
425         group { name: "gallery/segment_layout";
426            parts {
427               part { name: "bg";
428                  type: RECT;
429                  mouse_events: 1;
430                  scale: 1;
431                  description {
432                     state: "default" 0.0;
433                     visible: 0;
434                  }
435               }
436               part { name: "segment";
437                  type: SWALLOW;
438                  mouse_events: 1;
439                  scale: 1;
440                  description {
441                     state: "default" 0.0;
442                     //min: 493 74;
443                     min: 460 74;
444                     max: 876 74;
445                     align: 0.0 0.5;
446                     rel1 { relative: 0.0 0.0; to: "bg"; }
447                     rel2 { relative: 1.0 1.0; to: "bg"; }
448                  }
449               }
450            }
451         }
452 }
453