Merge "[Progressbar] issue image getting invisible for list progressbar. fixed."
[profile/ivi/efl-theme-tizen.git] / themes / groups / index.edc
1 /*
2  *  nBeat-theme
3  *
4  * Copyright (c) 2000 - 2010 Samsung Electronics Co., Ltd.
5  *
6  * Contact: Seokjae Jeong <seok.j.jeong@samsung.com>, Myoungwoon Roy Kim <Myoungwoon.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Jaehwan Kim <jae.hwan.kim@samsung.com>, 
7  *              Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, 
8  *              Hyunsil Park <hyunsil.park@samsung.com>, Sohyun Kim <anna1014.kim@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>
9  * 
10  * This library is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU Lesser General Public License as published by the
12  * Free Software Foundation; either version 2.1 of the License, or (at your option)
13  * any later version.
14  * 
15  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this library; if not, write to the Free Software Foundation, Inc., 51
22  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25
26    group { name: "elm/index/base/vertical/default";
27       script {
28          public timer_flag;
29          public index_hide_timer(val) {
30             if (get_int(timer_flag) == 1)
31                run_program(PROGRAM:"index0.inactive");
32             return 0;
33          }
34       }
35       images {
36          image: "00_fast_scroll_popup_bg.png" COMP;
37          image: "01_fast_scroll_first_bg_dim_top.png" COMP;
38          image: "01_fast_scroll_first_bg_dim_middle.png" COMP;
39          image: "01_fast_scroll_first_bg_dim_bottom.png" COMP;
40          image: "01_fast_scroll_second_bg_top.png" COMP;
41          image: "01_fast_scroll_second_bg_middle.png" COMP;
42          image: "01_fast_scroll_second_bg_bottom.png" COMP;
43          image: "00_fast_scroll_rollover_bg.png" COMP;
44          image: "00_fast_scroll_rollover_index_1_bg.png" COMP;
45       }
46       data{
47          item: "min_obj_height" "32";
48          item: "min_1st_level_obj_height" "32";
49          item: "special_char" "*";
50       }
51       parts {
52          part { name: "clip";
53             scale: 1;
54             type: RECT;
55             mouse_events:  0;
56             description { state: "default" 0.0;
57                visible:  0;
58                color: 255 255 255 0;
59             }
60             description { state: "active" 0.0;
61                visible:  1;
62                color: 255 255 255 255;
63             }
64          }
65          part { name: "clip2";
66             scale: 1;
67             type: RECT;
68             mouse_events:  0;
69             clip_to: "clip";
70             description { state: "default" 0.0;
71                visible: 0;
72                color: 255 255 255 0;
73             }
74             description { state: "active" 0.0;
75                visible:  1;
76                color: 255 255 255 255;
77             }
78          }
79          part { name: "elm.dragable.index.1";
80             mouse_events: 0;
81             scale: 1;
82             dragable {
83                x: 0 0 0;
84                y: 1 1 0;
85                confine: "elm.swallow.index.0";
86             }
87             description { state: "default" 0.0;
88                fixed: 1 1;
89                min: 27 38;
90                rel1 {
91                   relative: 0.5  0.5;
92                   offset:   0    0;
93                   to: "elm.swallow.index.0";
94                }
95                rel2 {
96                   relative: 0.5  0.5;
97                   offset:   0    0;
98                   to: "elm.swallow.index.0";
99                }
100             }
101          }
102          part { name: "elm.swallow.index.1.padding.right";
103             type: RECT;
104             scale: 1;
105             description { state: "default" 0.0;
106                min: 70 0;
107                fixed: 1 0;
108                align: 1.0 0.0;
109                rel1 {
110                   relative: 1.0 0.0;
111                   offset: 0 0;
112                }
113                rel2 {
114                   relative: 1.0 0.0;
115                   offset: 0 0;
116                }
117                color: 0 0 0 0;
118             }
119          }
120          part { name: "index.1.bg.image.middle";
121             mouse_events: 0;
122             scale: 1;
123             description { state: "default" 0.0;
124                visible: 0;
125                rel1 {
126                   to: "elm.swallow.index.1";
127                   offset: 0 0;
128                }
129                rel2 {
130                   to: "elm.swallow.index.1";
131                   offset: 0 0;
132                }
133                image {
134                   normal: "00_fast_scroll_rollover_index_1_bg.png";
135                   border: 2 2 2 2;
136                   border_scale: 1;
137                }
138                fill.smooth: 0;
139             }
140             description { state: "active" 0.0;
141                inherit: "default" 0.0;
142                visible: 1;
143             }
144          }
145          part { name: "elm.swallow.index.1";
146             type: SWALLOW;
147             scale: 1;
148             clip_to: "clip2";
149             description { state: "default" 0.0;
150                align: 0.5 0.5;
151                rel1 {
152                   to_y: "elm.dragable.index.1";
153                   relative: 1.0 0.5;
154                   offset: -1 0;
155                }
156                rel2 {
157                   to_y: "elm.dragable.index.1";
158                   relative: 1.0 0.5;
159                   offset: -1 -1;
160                }
161                color: 255 255 255 0;
162             }
163             description { state: "active" 0.0;
164                inherit: "default" 0.0;
165                rel1 {
166                   to_x: "elm.swallow.index.1.padding.right";
167                   relative: 0.0 0.5;
168                   offset: 0 0;
169                }
170                rel2 {
171                   to_x: "elm.swallow.index.1.padding.right";
172                   relative: 0.0 0.5;
173                   offset: 0 -1;
174                }
175                color: 255 255 255 255;
176             }
177          }
178          part { name: "index.0.bg.image.middle";
179             mouse_events: 0;
180             scale: 1;
181             description { state: "default" 0.0;
182                rel1 {
183                   to: "elm.swallow.index.0";
184                   offset: 0 0;
185                }
186                rel2 {
187                   to: "elm.swallow.index.0";
188                   offset: 0 0;
189                }
190                image {
191                   normal: "00_fast_scroll_rollover_bg.png";
192                   border: 2 0 2 2;
193                   border_scale: 1;
194                }
195                fill.smooth: 0;
196                visible: 0;
197                }
198             description { state: "active" 0.0;
199                inherit: "default" 0.0;
200                visible: 1;
201             }
202         }
203         part { name: "elm.swallow.index.0";
204             type: SWALLOW;
205             clip_to: "clip";
206             scale: 1;
207             description { state: "default" 0.0;
208                visible: 1;
209                align: 1.0 0.5;
210                rel1 {
211                   relative: 1.0 0.5;
212                   offset: -1 0;
213                }
214                rel2 {
215                   relative: 1.0 0.5;
216                   offset: -1 0;
217                }
218                color: 255 255 255 50;
219             }
220             description { state: "active" 0.0;
221                inherit: "default" 0.0;
222                color: 255 255 255 255;
223             }
224          }
225          part { name: "button_image_padding";
226             mouse_events: 0;
227             scale: 1;
228             clip_to: "clip";
229             type: RECT;
230             description { state: "default" 0.0;
231                align: 0.0 0.0;
232                min: 0 0;
233                max: 0 0;
234                fixed: 0 1;
235                rel1 {
236                   relative: 0.5 0.5;
237                   offset: 0 0;
238                }
239                rel2 {
240                   relative: 0.5 0.5;
241                   offset: 0 0;
242                }
243             }
244          }
245          part { name: "button_image";
246             scale: 1;
247             clip_to: "clip";
248             description { state: "default" 0.0;
249                align: 0.5 0.5;
250                min: 118 120;
251                fixed: 1 1;
252                rel1 {
253                   to_y: "button_image_padding";
254                   relative: 0.5 1.0;
255                }
256                rel2 {
257                   to_y: "button_image_padding";
258                   relative: 0.5 1.0;
259                   offset: 0 0;
260                }
261                image {
262                   normal: "00_fast_scroll_popup_bg.png";
263                   border: 12 12 12 14;
264                   border_scale: 1;
265                }
266                image.middle: 1;
267             }
268             description { state: "invisible" 0.0;
269                inherit: "default" 0.0;
270                visible: 0;
271             }
272             description { state: "index1" 0.0;
273                inherit: "default" 0.0;
274                /* ori 148, 120
275                 * but if TEXT MM width over 148
276                 */
277                min: 158 120;
278                fixed: 1 0;
279                rel1 {
280                   to: "button_image_padding";
281                   relative: 0.5 1.0;
282                }
283                rel2 {
284                   to: "button_image_padding";
285                   relative: 0.5 1.0;
286                }
287             }
288          }
289          part {
290             name: "elm.text";
291             type: "TEXT";
292             mouse_events: 0;
293             scale: 1;
294             clip_to: "clip";
295             description {
296                state: "default" 0.0;
297                align: 0.5 0.5;
298                fixed: 1 1;
299                min: 40 20;
300                visible: 0;
301                rel1 {
302                   to: "button_image";
303                   relative: 0.0 0.0;
304                }
305                rel2 {
306                   to: "button_image";
307                   relative: 1.0 1.0;
308                   offset: -8 -10;
309                }
310                color: 88 83 79 255;
311                color3: 0 0 0 64;
312                text {
313                   font: "SLP:style=Bold";
314                   size: 78;
315                   min: 1 1;
316                }
317             }
318             description { state: "active" 0.0;
319                inherit: "default" 0.0;
320                visible: 1;
321             }
322          }
323          part { name: "elm.dragable.pointer";
324             type: RECT;
325             scale: 1;
326             mouse_events: 0;
327             dragable {
328                x: 1 1 0;
329                y: 1 1 0;
330             }
331             clip_to: "clip";
332             description { state: "default" 0.0;
333                fixed: 1 1;
334                min: 8 8;
335                max: 8 8;
336                rel1 {
337                   relative: 0.0 0.0;
338                   offset:   0 0;
339                }
340                rel2 {
341                   relative: 0.0 0.0;
342                   offset:   0 0;
343                }
344                color: 0 0 0 0;
345             }
346          }
347          part { name: "elm.swallow.event.0.bottom.padding";
348             type: RECT;
349             scale: 1;
350             description { state: "default" 0.0;
351                min: 0 SOFTKEY_H;
352                fixed: 0 1;
353                align: 0.5 1.0;
354                rel1{
355                   relative: 1.0 1.0; offset: 0 0;
356                }
357                color: 0 0 0 0;
358             }
359          }
360          part { name: "elm.swallow.event.0";
361             type: SWALLOW;
362             scale: 1;
363             description { state: "default" 0.0;
364                fixed: 1 1;
365                align: 1.0 0.5;
366                rel1 {
367                   relative: 1.0 0.0;
368                   offset: -1 0;
369                }
370                rel2 {
371                   relative: 1.0 0.0;
372                   offset: -1 -1;
373                   to_y: "elm.swallow.event.0.bottom.padding";
374                }
375             }
376          }
377          part { name: "elm.swallow.event.1";
378             type: SWALLOW;
379             scale: 1;
380             description { state: "default" 0.0;
381                align: 1.0 0.5;
382                fixed: 1 1;
383                rel1 {
384                   to: "elm.swallow.index.1";
385                   relative: 0.0 0.0;
386                   offset: -1 0;
387                }
388                rel2 {
389                   to: "elm.swallow.index.1";
390                   relative: 0.0 1.0;
391                   offset: -1 -1;
392                }
393             }
394          }
395       }
396       programs {
397          program { name: "load";
398             signal: "load";
399             source: "";
400             script {
401                run_program(PROGRAM:"initial.index0.active");
402                run_program(PROGRAM:"button.image.hidden");
403                timer(2.0, "index_hide_timer", 0);
404             }
405          }
406          program { name: "drag2";
407             signal: "drag,set";
408             source: "elm.dragable.index.1";
409             script {
410                new Float:dx;
411                new Float:dy;
412                get_drag(PART:"elm.dragable.index.1", dx, dy);
413                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
414                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
415             }
416          }
417          program { name: "first_level_invisible";
418             signal: "hide_first_level";
419             source: "";
420             action: STATE_SET "index1" 0.0;
421             target: "button_image";
422          }
423          program { name: "2nd_level_invisible";
424             signal: "hide_2nd_level";
425             source: "";
426             action: STATE_SET "default" 0.0;
427             target: "button_image";
428          }
429          program { name: "index0.active";
430             signal: "elm,state,active";
431             source: "elm";
432             action: STATE_SET "active" 0.0;
433             transition: DECELERATE 0.3;
434             target: "elm.swallow.index.0";
435             target: "clip";
436             target: "index.0.bg.image.middle";
437             target: "elm.text";
438             after: "disable_timer";
439          }
440          program { name: "initial.index0.active";
441             action: STATE_SET "active" 0.0;
442             transition: DECELERATE 0.3;
443             target: "elm.swallow.index.0";
444             target: "clip";
445             target: "index.0.bg.image.middle";
446             after: "enable_timer";
447          }
448          program { name: "index0.inactive";
449             signal: "elm,state,inactive";
450             source: "elm";
451             action: STATE_SET "default" 0.0;
452             transition: DECELERATE 0.3;
453             target: "elm.swallow.index.0";
454             target: "clip";
455             target: "index.0.bg.image.middle";
456          }
457          program { name: "index1.inactive";
458             signal: "elm,state,level,0";
459             source: "elm";
460             action: STATE_SET "default" 0.0;
461             transition: DECELERATE 0.3;
462             target: "elm.swallow.index.1";
463             target: "clip2";
464             target: "index.1.bg.image.middle";
465          }
466          program { name: "index1.active";
467             signal: "elm,state,level,1";
468             source: "elm";
469             action: STATE_SET "active" 0.0;
470             transition: DECELERATE 0.3;
471             target: "elm.swallow.index.1";
472             target: "clip2";
473             target: "index.1.bg.image.middle";
474          }
475          program { name: "button.image.hidden";
476             signal: "elm,state,button,image,hide";
477             source: "elm";
478             action: STATE_SET "invisible" 0.0;
479             target: "button_image";
480          }
481          program { name: "disable_timer";
482             script {
483                set_int(timer_flag, 0);
484             }
485          }
486          program { name: "enable_timer";
487             script {
488                set_int(timer_flag, 1);
489             }
490          }
491       }
492    }
493
494    group { name: "elm/index/item/vertical/default";
495       alias: "elm/index/item_odd/vertical/default";
496       data.item: "stacking" "above";
497       data.item: "selectraise" "on";
498       parts {
499          part { name: "elm.text";
500             type: TEXT;
501             mouse_events: 0;
502             scale: 1;
503             description {
504                min: 27 20;
505                align: 0.5 0.5;
506                state: "default" 0.0;
507                rel1 {
508                   relative: 0.0  0.0;
509                }
510                rel2 {
511                   relative: 1.0  1.0;
512                }
513                color: 93 93 93 200;
514                text {
515                   font: "SLP:style=Medium";
516                   size: 14;
517                   min: 1 1;
518                   align: 0.5 0.5;
519                }
520             }
521             description { state: "active" 0.0;
522                inherit: "default" 0.0;
523                color: 58 60 9 255;
524             }
525          }
526       }
527       programs {
528          program { name: "active";
529             signal: "elm,state,active";
530             source: "elm";
531             action: STATE_SET "active" 0.0;
532             transition: DECELERATE 1.0;
533             target: "elm.text";
534          }
535          program { name: "inactive";
536             signal: "elm,state,inactive";
537             source: "elm";
538             action: STATE_SET "default" 0.0;
539             transition: DECELERATE 0.1;
540             target: "elm.text";
541          }
542       }
543    }