merge with master
[profile/ivi/efl-theme-tizen.git] / themes / widgets / index.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20    group { name: "elm/index/base/vertical/default";
21       script {
22          public timer_flag;
23          public index_hide_timer(val) {
24             if (get_int(timer_flag) == 1)
25                run_program(PROGRAM:"index0.inactive");
26             return 0;
27          }
28       }
29       images {
30          image: "00_fast_scroll_rollover_bg.png" COMP;
31          image: "00_fast_scroll_popup_bg.png" COMP;
32       }
33       parts {
34          part { name: "clip";
35             scale: 1;
36             type: RECT;
37             mouse_events:  0;
38             description { state: "default" 0.0;
39                visible:  0;
40                color: 255 255 255 0;
41             }
42             description { state: "active" 0.0;
43                visible:  1;
44                color: 255 255 255 255;
45             }
46          }
47          part { name: "clip2";
48             scale: 1;
49             type: RECT;
50             mouse_events:  0;
51             clip_to: "clip";
52             description { state: "default" 0.0;
53                visible: 0;
54                color: 255 255 255 0;
55             }
56             description { state: "active" 0.0;
57                visible:  1;
58                color: 255 255 255 255;
59             }
60          }
61          part { name: "elm.dragable.index.1";
62             type: RECT;
63             mouse_events: 0;
64             scale: 1;
65             dragable {
66                x: 0 0 0;
67                y: 1 1 0;
68                confine: "elm.swallow.index.0";
69             }
70             description { state: "default" 0.0;
71                visible: 0;
72                fixed: 1 1;
73                min: 20 38;
74                rel1 {
75                   relative: 0.5  0.5;
76                   offset:   0    0;
77                   to: "elm.swallow.index.0";
78                }
79                rel2 {
80                   relative: 0.5  0.5;
81                   offset:   0    0;
82                   to: "elm.swallow.index.0";
83                }
84             }
85          }
86          part { name: "index.top.padding";
87             type: RECT;
88             scale: 1;
89             description {
90                align: 0.5 0.0;
91                min: 0 INDEX_PADDING_SIZE_INC;
92                visible: 0;
93                fixed: 0 1;
94                rel1 {
95                   to_x: "elm.swallow.index.0";
96                   relative: 0.0 0.0;
97                }
98                rel2 {
99                   to_x: "elm.swallow.index.0";
100                   relative: 1.0 0.0;
101                }
102             }
103          }
104          part { name: "index.bottom.padding";
105             type: RECT;
106             scale: 1;
107             description {
108                align: 0.5 1.0;
109                min: 0 INDEX_PADDING_SIZE_INC;
110                visible: 0;
111                fixed: 0 1;
112                rel1 {
113                   to_x: "elm.swallow.index.0";
114                   relative: 0.0 1.0;
115                }
116                rel2 {
117                   to_x: "elm.swallow.index.0";
118                   relative: 1.0 1.0;
119                }
120             }
121          }
122          part { name: "bg";
123             type: IMAGE;
124             clip_to: "clip";
125             scale: 1;
126             description { state: "default" 0.0;
127                rel1 {
128                   to: "index.top.padding";
129                }
130                rel2 {
131                   to: "index.bottom.padding";
132                }
133                image {
134                   normal: "00_fast_scroll_rollover_bg.png";
135                }
136             }
137          }
138          part { name: "left.line";
139             type: RECT;
140             clip_to: "clip";
141             scale: 1;
142             description { state: "default" 0.0;
143                align: 0.0 0.5;
144                min: INDEX_LEFT_LINE_WIDTH_INC 0;
145                fixed: 1 1;
146                rel1 {
147                   to: "bg";
148                   relative: 0.0 0.0;
149                }
150                rel2 {
151                   to: "bg";
152                   relative: 0.0 1.0;
153                }
154                color: INDEX_LEFT_LINE_COLOR_INC;
155             }
156          }
157          part { name: "elm.swallow.index.0";
158             type: SWALLOW;
159             clip_to: "clip";
160             scale: 1;
161             description { state: "default" 0.0;
162                visible: 1;
163                align: 1.0 0.5;
164                fixed: 1 1;
165                rel1 {
166                   to_y: "index.top.padding";
167                   relative: 1.0 1.0;
168                }
169                rel2 {
170                   to_y: "index.bottom.padding";
171                   relative: 1.0 0.0;
172                }
173                color: 255 255 255 255;
174             }
175          }
176          part { name: "button_image";
177             scale: 1;
178             clip_to: "clip2";
179             description { state: "default" 0.0;
180                align: 0.5 0.5;
181                fixed: 1 1;
182                rel1 {
183                   to_x: "left.padding";
184                   to_y: "top.padding";
185                }
186                rel2 {
187                   to_x: "right.padding";
188                   to_y: "bottom.padding";
189                }
190                image {
191                   normal: "00_fast_scroll_popup_bg.png";
192                   border: INDEX_POPUP_BG_NINEPATCH_INC;
193                   border_scale: 1;
194                }
195                image.middle: 1;
196             }
197          }
198          part { name: "top.padding";
199             type: RECT;
200             scale: 1;
201             clip_to: "clip2";
202             description {
203                state: "default" 0.0;
204                align: 0.5 1.0;
205                min: 0 INDEX_POPUP_TOP_PADDING_SIZE_INC;
206                fixed: 1 1;
207                rel1 {
208                   to: "elm.text";
209                   relative: 0.0 0.0;
210                }
211                rel2 {
212                   to: "elm.text";
213                   relative: 1.0 0.0;
214                }
215                visible: 0;
216             }
217          }
218          part { name: "bottom.padding";
219             type: RECT;
220             scale: 1;
221             clip_to: "clip2";
222             description {
223                state: "default" 0.0;
224                align: 0.5 0.0;
225                min: 0 INDEX_POPUP_BOTTOM_PADDING_SIZE_INC;
226                fixed: 1 1;
227                rel1 {
228                   to: "elm.text";
229                   relative: 0.0 1.0;
230                }
231                rel2 {
232                   to: "elm.text";
233                   relative: 1.0 1.0;
234                }
235                visible: 0;
236             }
237          }
238          part { name: "left.padding";
239             type: RECT;
240             scale: 1;
241             clip_to: "clip2";
242             description {
243                state: "default" 0.0;
244                align: 1.0 0.5;
245                min: INDEX_POPUP_LEFT_PADDING_SIZE_INC 0;
246                fixed: 1 1;
247                rel1 {
248                   to: "elm.text";
249                   relative: 0.0 0.0;
250                }
251                rel2 {
252                   to: "elm.text";
253                   relative: 0.0 1.0;
254                }
255                visible: 0;
256             }
257          }
258          part { name: "right.padding";
259             type: RECT;
260             scale: 1;
261             clip_to: "clip2";
262             description {
263                state: "default" 0.0;
264                align: 0.0 0.5;
265                min: INDEX_POPUP_RIGHT_PADDING_SIZE_INC 0;
266                fixed: 1 1;
267                rel1 {
268                   to: "elm.text";
269                   relative: 1.0 0.0;
270                }
271                rel2 {
272                   to: "elm.text";
273                   relative: 1.0 1.0;
274                }
275                visible: 0;
276             }
277          }
278          part {
279             name: "elm.text";
280             type: "TEXT";
281             mouse_events: 0;
282             scale: 1;
283             clip_to: "clip2";
284             description {
285                state: "default" 0.0;
286                align: 0.5 0.5;
287                fixed: 1 1;
288                min: INDEX_POPUP_TEXT_WIDTH_INC INDEX_POPUP_TEXT_HEIGHT_INC;
289                rel1 {
290                   relative: 0.5 0.5;
291                }
292                rel2 {
293                   relative: 0.5 0.5;
294                }
295                color: INDEX_POPUP_TEXT_COLOR_INC;
296                text {
297                   font: "Tizen:style=Medium";
298                   size: INDEX_POPUP_TEXT_SIZE_INC;
299                   min: 1 1;
300                   text_class: "tizen";
301                }
302             }
303          }
304          part { name: "elm.dragable.pointer";
305             type: RECT;
306             scale: 1;
307             mouse_events: 0;
308             dragable {
309                x: 1 1 0;
310                y: 1 1 0;
311             }
312             clip_to: "clip";
313             description { state: "default" 0.0;
314                fixed: 1 1;
315                min: 8 8;
316                max: 8 8;
317                rel1 {
318                   relative: 0.0 0.0;
319                   offset:   0 0;
320                }
321                rel2 {
322                   relative: 0.0 0.0;
323                   offset:   0 0;
324                }
325                color: 0 0 0 0;
326             }
327          }
328          part { name: "elm.swallow.event.0";
329             type: SWALLOW;
330             scale: 1;
331             description { state: "default" 0.0;
332                fixed: 1 1;
333                align: 1.0 0.5;
334                rel1 {
335                   relative: 1.0 0.0;
336                   offset: -1 0;
337                }
338                rel2 {
339                   relative: 1.0 1.0;
340                   offset: -1 -1;
341                }
342             }
343          }
344          part {
345             name: "access";
346             type: RECT;
347             description { state: "default" 0.0;
348                fixed: 1 1;
349                rel1 {
350                   to: "elm.swallow.index.0";
351                   offset: -3 0;
352                }
353                rel2 {
354                   to: "elm.swallow.index.0";
355                }
356                color: 0 0 0 0;
357                visible: 0;
358             }
359             description { state: "active" 0.0;
360                inherit: "default" 0.0;
361                visible: 1;
362             }
363          }
364       }
365       programs {
366          program { name: "load";
367             signal: "load";
368             source: "";
369             script {
370                run_program(PROGRAM:"initial.index0.active");
371                timer(2.0, "index_hide_timer", 0);
372             }
373          }
374          program { name: "drag2";
375             signal: "drag,set";
376             source: "elm.dragable.index.1";
377             script {
378                new Float:dx;
379                new Float:dy;
380                get_drag(PART:"elm.dragable.index.1", dx, dy);
381                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
382                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
383             }
384          }
385          program { name: "index0.active";
386             signal: "elm,state,active";
387             source: "elm";
388             action: STATE_SET "active" 0.0;
389             target: "clip";
390             after: "disable_timer";
391          }
392          program { name: "initial.index0.active";
393             action: STATE_SET "active" 0.0;
394             target: "clip";
395             after: "enable_timer";
396          }
397          program { name: "index0.inactive";
398             signal: "elm,state,inactive";
399             source: "elm";
400             action: STATE_SET "default" 0.0;
401             transition: DECELERATE 0.3;
402             target: "clip";
403          }
404          program { name: "index.active";
405             signal: "elm,indicator,state,active";
406             source: "elm";
407             action: STATE_SET "active" 0.0;
408             target: "clip2";
409          }
410          program { name: "index.inactive";
411             signal: "elm,indicator,state,inactive";
412             source: "elm";
413             action: STATE_SET "default" 0.0;
414             transition: DECELERATE 0.3;
415             target: "clip2";
416          }
417          program {
418             name: "access.active";
419             signal: "elm,access,state,active";
420             source: "elm";
421             action: STATE_SET "active" 0.0;
422             target: "access";
423          }
424          program {
425             name: "access.inactive";
426             signal: "elm,access,state,inactive";
427             source: "elm";
428             action: STATE_SET "default" 0.0;
429             target: "access";
430          }
431          program { name: "disable_timer";
432             script {
433                set_int(timer_flag, 0);
434             }
435          }
436          program { name: "enable_timer";
437             script {
438                set_int(timer_flag, 1);
439             }
440          }
441       }
442    }
443
444    group { name: "elm/index/item/vertical/default";
445       alias: "elm/index/item_odd/vertical/default";
446       data.item: "stacking" "above";
447       data.item: "selectraise" "on";
448       images {
449          image: "00_fast_scroll_rollover_bg_focus.png" COMP;
450          image: "00_fast_scroll_rollover_bg_line_focus.png" COMP;
451       }
452       parts {
453          part { name: "scroll.bg";
454             type: IMAGE;
455             mouse_events: 0;
456             scale: 1;
457             description { state: "default" 0.0;
458                rel1.to: "elm.text";
459                rel2.to: "elm.text";
460                image {
461                   normal: "00_fast_scroll_rollover_bg_focus.png";
462                }
463                visible: 0;
464             }
465             description { state: "active" 0.0;
466                inherit: "default" 0.0;
467                visible: 1;
468             }
469          }
470          part { name: "bottom.line";
471             type: RECT;
472             mouse_events: 0;
473             scale: 1;
474             description {
475                state: "default" 0.0;
476                align: 0.5 1.0;
477                min: 0 INDEX_BOTTOM_LINE_WIDTH_INC;
478                fixed: 1 1;
479                rel1 {
480                   relative: 0.0 1.0;
481                   offset: 6 0;
482                }
483                rel2 {
484                   relative: 1.0 1.0;
485                   offset: -3 0;
486                }
487                color: INDEX_BOTTOM_LINE_COLOR_INC;
488             }
489             description {
490                state: "inactive" 0.0;
491                inherit: "default" 0.0;
492                visible: 0;
493             }
494          }
495          part { name: "focus.top";
496             type: RECT;
497             mouse_events: 0;
498             scale: 1;
499             description {
500                state: "default" 0.0;
501                align: 0.5 1.0;
502                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
503                fixed: 1 1;
504                visible: 0;
505                rel1 {
506                   relative: 0.0 0.0;
507                }
508                rel2 {
509                   relative: 1.0 0.0;
510                }
511             }
512          }
513          part { name: "focus.bottom";
514             type: RECT;
515             mouse_events: 0;
516             scale: 1;
517             description {
518                state: "default" 0.0;
519                align: 0.5 0.0;
520                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
521                fixed: 1 1;
522                visible: 0;
523                rel1 {
524                   to: "bottom.line";
525                   relative: 0.0 0.0;
526                }
527                rel2 {
528                   to: "bottom.line";
529                   relative: 1.0 0.0;
530                }
531             }
532          }
533          part { name: "right.padding";
534             type: RECT;
535             mouse_events: 0;
536             scale: 1;
537             description {
538                state: "default" 0.0;
539                align: 1.0 0.5;
540                min: INDEX_ITEM_PADDING_SIZE_INC 0;
541                fixed: 1 1;
542                visible: 0;
543                rel1 {
544                   relative: 1.0 0.0;
545                }
546                rel2 {
547                   relative: 1.0 1.0;
548                }
549             }
550          }
551          part { name: "item.bg";
552             type: IMAGE;
553             mouse_events: 0;
554             scale: 1;
555             description {
556                state: "default" 0.0;
557                visible: 0;
558                rel1 {
559                   to_y: "focus.top";
560                }
561                rel2 {
562                   to_x: "right.padding";
563                   to_y: "focus.bottom";
564                   relative: 0.0 1.0;
565                }
566                image {
567                   normal: "00_fast_scroll_rollover_bg_line_focus.png";
568                   border: INDEX_BG_NINEPATCH_INC;
569                   border_scale: 1;
570                }
571             }
572             description {
573                state: "active" 0.0;
574                inherit: "default" 0.0;
575                visible: 1;
576             }
577          }
578          part { name: "elm.text";
579             type: TEXT;
580             mouse_events: 0;
581             scale: 1;
582             description {
583                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
584                align: 0.5 0.5;
585                state: "default" 0.0;
586                rel1 {
587                   relative: 0.0  0.0;
588                }
589                rel2 {
590                   relative: 1.0  1.0;
591                }
592                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
593                text {
594                   font: "Tizen:style=Bold";
595                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
596                   min: 1 1;
597                   align: 0.5 0.5;
598                   text_class: "tizen";
599                }
600             }
601             description { state: "active" 0.0;
602                inherit: "default" 0.0;
603                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
604             }
605          }
606       }
607       programs {
608          program { name: "active";
609             signal: "elm,state,active";
610             source: "elm";
611             action: STATE_SET "active" 0.0;
612             transition: DECELERATE 0.0;
613             target: "elm.text";
614             target: "item.bg";
615             target: "scroll.bg";
616          }
617          program { name: "inactive";
618             signal: "elm,state,inactive";
619             source: "elm";
620             action: STATE_SET "default" 0.0;
621             transition: DECELERATE 0.0;
622             target: "elm.text";
623             target: "item.bg";
624             target: "scroll.bg";
625          }
626          program {
627             signal: "elm,last,item";
628             source: "elm";
629             action: STATE_SET "inactive" 0.0;
630             target: "bottom.line";
631          }
632       }
633    }
634    group {
635       name: "elm/index/base/vertical/pagecontrol";
636       alias: "elm/index/base/horizontal/pagecontrol";
637       parts {
638          part { name: "clip";
639             type: RECT;
640             mouse_events:  0;
641             description { state: "default" 0.0;
642                visible:  0;
643                color: 255 255 255 0;
644             }
645             description { state: "active" 0.0;
646                visible:  1;
647                color: 255 255 255 255;
648             }
649          }
650          part { name: "elm.swallow.index.0";
651             type: SWALLOW;
652             scale: 1;
653             clip_to: "clip";
654             description {
655                state: "default" 0.0;
656                align: 0.5 0.5;
657                rel1.relative: 0.5 0.5;
658                rel2.relative: 0.5 0.5;
659             }
660          }
661          part { name: "elm.swallow.event.0";
662             type: SWALLOW;
663             description { state: "default" 0.0;
664                align: 0.5 0.5;
665             }
666          }
667       }
668       programs {
669          program { name: "active";
670             signal: "elm,state,active";
671             source: "elm";
672             action: STATE_SET "active" 0.0;
673             transition: DECELERATE 0.5;
674             target: "clip";
675          }
676          program { name: "inactive";
677             signal: "elm,state,inactive";
678             source: "elm";
679             action: STATE_SET "default" 0.0;
680             transition: DECELERATE 0.5;
681             target: "clip";
682          }
683       }
684    }
685    group {
686       name: "elm/index/item/vertical/pagecontrol";
687       alias: "elm/index/item_odd/vertical/pagecontrol";
688       alias: "elm/index/item/horizontal/pagecontrol";
689       alias: "elm/index/item_odd/horizontal/pagecontrol";
690       images {
691          image: "00_page_indicator_01.png" COMP;
692          image: "00_page_indicator_02.png" COMP;
693       }
694       parts {
695          part { name:"bg";
696             type : RECT;
697             scale: 1;
698             description { state: "default" 0.0;
699                min: INDEX_PAGECONTROL_IND_INC;
700                max: INDEX_PAGECONTROL_IND_INC;
701                visible: 0;
702                align: 0.5 0.5;
703             }
704          }
705          part { name: "indicator1";
706             type: IMAGE;
707             mouse_events: 0;
708             scale: 1;
709             description { state: "default" 0.0;
710                align: 0.5 0.5;
711                fixed: 1 1;
712                min: INDEX_PAGECONTROL_IND_MIN_INC;
713                max: INDEX_PAGECONTROL_IND_MIN_INC;
714                image {
715                   normal: "00_page_indicator_02.png";
716                }
717             }
718             description { state: "active" 0.0;
719                inherit: "default" 0.0;
720                visible: 0;
721             }
722          }
723          part { name: "indicator2";
724             type: IMAGE;
725             mouse_events: 0;
726             scale: 1;
727             description { state: "default" 0.0;
728                align: 0.5 0.5;
729                fixed: 1 1;
730                min: INDEX_PAGECONTROL_IND_MIN_INC;
731                max: INDEX_PAGECONTROL_IND_MIN_INC;
732                image.normal: "00_page_indicator_01.png";
733                visible: 0;
734             }
735             description { state: "active" 0.0;
736                inherit: "default" 0.0;
737                visible: 1;
738             }
739          }
740       }
741       programs {
742          program { name: "active";
743             signal: "elm,state,active";
744             source: "elm";
745             action: STATE_SET "active" 0.0;
746             target: "indicator1";
747             target: "indicator2";
748             transition: LINEAR 0.2;
749          }
750          program { name: "inactive";
751             signal: "elm,state,inactive";
752             source: "elm";
753             action: STATE_SET "default" 0.0;
754             target: "indicator1";
755             target: "indicator2";
756             transition: LINEAR 0.2;
757          }
758       }
759    }