[diskselector.edc] Diskselector timepicker style elm.text selected state text_class...
[platform/core/uifw/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_id, timer_flag;
23          public index_hide_timer(val) {
24             if (get_int(timer_flag) == 1)
25                run_program(PROGRAM:"index0.hide");
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             }
372          }
373          program { name: "drag2";
374             signal: "drag,set";
375             source: "elm.dragable.index.1";
376             script {
377                new Float:dx;
378                new Float:dy;
379                get_drag(PART:"elm.dragable.index.1", dx, dy);
380                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
381                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
382             }
383          }
384          program { name: "index0.active";
385             signal: "elm,state,active";
386             source: "elm";
387             action: STATE_SET "active" 0.0;
388             target: "clip";
389             after: "disable_timer";
390          }
391          program { name: "initial.index0.active";
392             action: STATE_SET "active" 0.0;
393             target: "clip";
394             after: "index0.inactive";
395          }
396          program { name: "index0.inactive";
397             signal: "elm,state,inactive";
398             source: "elm";
399             script {
400                new v;
401                v = get_int(timer_id);
402                if (v > 0) cancel_timer(v);
403                run_program(PROGRAM:"enable_timer");
404                v = timer(2.0, "index_hide_timer", 0);
405                set_int(timer_id, v);
406             }
407          }
408          program { name: "index0.hide";
409             action: STATE_SET "default" 0.0;
410             transition: DECELERATE 0.3;
411             target: "clip";
412             after: "disable_timer";
413          }
414          program { name: "index.active";
415             signal: "elm,indicator,state,active";
416             source: "elm";
417             action: STATE_SET "active" 0.0;
418             target: "clip2";
419          }
420          program { name: "index.inactive";
421             signal: "elm,indicator,state,inactive";
422             source: "elm";
423             action: STATE_SET "default" 0.0;
424             transition: DECELERATE 0.3;
425             target: "clip2";
426          }
427          program {
428             name: "access.active";
429             signal: "elm,access,state,active";
430             source: "elm";
431             action: STATE_SET "active" 0.0;
432             target: "access";
433          }
434          program {
435             name: "access.inactive";
436             signal: "elm,access,state,inactive";
437             source: "elm";
438             action: STATE_SET "default" 0.0;
439             target: "access";
440          }
441          program { name: "disable_timer";
442             script {
443                set_int(timer_flag, 0);
444             }
445          }
446          program { name: "enable_timer";
447             script {
448                set_int(timer_flag, 1);
449             }
450          }
451       }
452    }
453
454    group { name: "elm/index/item/vertical/default";
455       alias: "elm/index/item_odd/vertical/default";
456       data.item: "stacking" "above";
457       data.item: "selectraise" "on";
458       images {
459          image: "00_fast_scroll_rollover_bg_focus.png" COMP;
460          image: "00_fast_scroll_rollover_bg_line_focus.png" COMP;
461       }
462       parts {
463          part { name: "scroll.bg";
464             type: IMAGE;
465             mouse_events: 0;
466             scale: 1;
467             description { state: "default" 0.0;
468                rel1.to: "elm.text";
469                rel2.to: "elm.text";
470                image {
471                   normal: "00_fast_scroll_rollover_bg_focus.png";
472                }
473                visible: 0;
474             }
475             description { state: "active" 0.0;
476                inherit: "default" 0.0;
477                visible: 1;
478             }
479          }
480          part { name: "bottom.line";
481             type: RECT;
482             mouse_events: 0;
483             scale: 1;
484             description {
485                state: "default" 0.0;
486                align: 0.5 1.0;
487                min: 0 INDEX_BOTTOM_LINE_WIDTH_INC;
488                fixed: 1 1;
489                rel1 {
490                   relative: 0.0 1.0;
491                   offset: 6 0;
492                }
493                rel2 {
494                   relative: 1.0 1.0;
495                   offset: -3 0;
496                }
497                color: INDEX_BOTTOM_LINE_COLOR_INC;
498             }
499             description {
500                state: "inactive" 0.0;
501                inherit: "default" 0.0;
502                visible: 0;
503             }
504          }
505          part { name: "focus.top";
506             type: RECT;
507             mouse_events: 0;
508             scale: 1;
509             description {
510                state: "default" 0.0;
511                align: 0.5 1.0;
512                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
513                fixed: 1 1;
514                visible: 0;
515                rel1 {
516                   relative: 0.0 0.0;
517                }
518                rel2 {
519                   relative: 1.0 0.0;
520                }
521             }
522          }
523          part { name: "focus.bottom";
524             type: RECT;
525             mouse_events: 0;
526             scale: 1;
527             description {
528                state: "default" 0.0;
529                align: 0.5 0.0;
530                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
531                fixed: 1 1;
532                visible: 0;
533                rel1 {
534                   to: "bottom.line";
535                   relative: 0.0 0.0;
536                }
537                rel2 {
538                   to: "bottom.line";
539                   relative: 1.0 0.0;
540                }
541             }
542          }
543          part { name: "right.padding";
544             type: RECT;
545             mouse_events: 0;
546             scale: 1;
547             description {
548                state: "default" 0.0;
549                align: 1.0 0.5;
550                min: INDEX_ITEM_PADDING_SIZE_INC 0;
551                fixed: 1 1;
552                visible: 0;
553                rel1 {
554                   relative: 1.0 0.0;
555                }
556                rel2 {
557                   relative: 1.0 1.0;
558                }
559             }
560          }
561          part { name: "item.bg";
562             type: IMAGE;
563             mouse_events: 0;
564             scale: 1;
565             description {
566                state: "default" 0.0;
567                visible: 0;
568                rel1 {
569                   to_y: "focus.top";
570                }
571                rel2 {
572                   to_x: "right.padding";
573                   to_y: "focus.bottom";
574                   relative: 0.0 1.0;
575                }
576                image {
577                   normal: "00_fast_scroll_rollover_bg_line_focus.png";
578                   border: INDEX_BG_NINEPATCH_INC;
579                   border_scale: 1;
580                }
581             }
582             description {
583                state: "active" 0.0;
584                inherit: "default" 0.0;
585                visible: 1;
586             }
587          }
588          part { name: "elm.text";
589             type: TEXT;
590             mouse_events: 0;
591             scale: 1;
592             description {
593                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
594                align: 0.5 0.5;
595                state: "default" 0.0;
596                rel1 {
597                   relative: 0.0  0.0;
598                }
599                rel2 {
600                   relative: 1.0  1.0;
601                }
602                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
603                text {
604                   font: "Tizen:style=Bold";
605                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
606                   align: 0.5 0.5;
607                   text_class: "tizen";
608                }
609             }
610             description { state: "active" 0.0;
611                inherit: "default" 0.0;
612                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
613             }
614          }
615       }
616       programs {
617          program { name: "active";
618             signal: "elm,state,active";
619             source: "elm";
620             action: STATE_SET "active" 0.0;
621             transition: DECELERATE 0.0;
622             target: "elm.text";
623             target: "item.bg";
624             target: "scroll.bg";
625          }
626          program { name: "inactive";
627             signal: "elm,state,inactive";
628             source: "elm";
629             action: STATE_SET "default" 0.0;
630             transition: DECELERATE 0.0;
631             target: "elm.text";
632             target: "item.bg";
633             target: "scroll.bg";
634          }
635          program {
636             signal: "elm,last,item";
637             source: "elm";
638             action: STATE_SET "inactive" 0.0;
639             target: "bottom.line";
640          }
641       }
642    }
643    group {
644       name: "elm/index/base/vertical/pagecontrol";
645       alias: "elm/index/base/horizontal/pagecontrol";
646       parts {
647          part { name: "clip";
648             type: RECT;
649             mouse_events:  0;
650             description { state: "default" 0.0;
651                visible:  0;
652                color: 255 255 255 0;
653             }
654             description { state: "active" 0.0;
655                visible:  1;
656                color: 255 255 255 255;
657             }
658          }
659          part { name: "elm.swallow.index.0";
660             type: SWALLOW;
661             scale: 1;
662             clip_to: "clip";
663             description {
664                state: "default" 0.0;
665                align: 0.5 0.5;
666                rel1.relative: 0.5 0.5;
667                rel2.relative: 0.5 0.5;
668             }
669          }
670          part { name: "elm.swallow.event.0";
671             type: SWALLOW;
672             description { state: "default" 0.0;
673                align: 0.5 0.5;
674             }
675          }
676       }
677       programs {
678          program { name: "active";
679             signal: "elm,state,active";
680             source: "elm";
681             action: STATE_SET "active" 0.0;
682             transition: DECELERATE 0.5;
683             target: "clip";
684          }
685          program { name: "inactive";
686             signal: "elm,state,inactive";
687             source: "elm";
688             action: STATE_SET "default" 0.0;
689             transition: DECELERATE 0.5;
690             target: "clip";
691          }
692       }
693    }
694    group {
695       name: "elm/index/item/vertical/pagecontrol";
696       alias: "elm/index/item_odd/vertical/pagecontrol";
697       alias: "elm/index/item/horizontal/pagecontrol";
698       alias: "elm/index/item_odd/horizontal/pagecontrol";
699       images {
700          image: "00_page_indicator_01.png" COMP;
701          image: "00_page_indicator_02.png" COMP;
702       }
703       parts {
704          part { name:"bg";
705             type : RECT;
706             scale: 1;
707             description { state: "default" 0.0;
708                min: INDEX_PAGECONTROL_IND_INC;
709                max: INDEX_PAGECONTROL_IND_INC;
710                visible: 0;
711                align: 0.5 0.5;
712             }
713          }
714          part { name: "indicator1";
715             type: IMAGE;
716             mouse_events: 0;
717             scale: 1;
718             description { state: "default" 0.0;
719                align: 0.5 0.5;
720                fixed: 1 1;
721                min: INDEX_PAGECONTROL_IND_MIN_INC;
722                max: INDEX_PAGECONTROL_IND_MIN_INC;
723                image {
724                   normal: "00_page_indicator_02.png";
725                }
726             }
727             description { state: "active" 0.0;
728                inherit: "default" 0.0;
729                visible: 0;
730             }
731          }
732          part { name: "indicator2";
733             type: IMAGE;
734             mouse_events: 0;
735             scale: 1;
736             description { state: "default" 0.0;
737                align: 0.5 0.5;
738                fixed: 1 1;
739                min: INDEX_PAGECONTROL_IND_MIN_INC;
740                max: INDEX_PAGECONTROL_IND_MIN_INC;
741                image.normal: "00_page_indicator_01.png";
742                visible: 0;
743             }
744             description { state: "active" 0.0;
745                inherit: "default" 0.0;
746                visible: 1;
747             }
748          }
749       }
750       programs {
751          program { name: "active";
752             signal: "elm,state,active";
753             source: "elm";
754             action: STATE_SET "active" 0.0;
755             target: "indicator1";
756             target: "indicator2";
757             transition: LINEAR 0.2;
758          }
759          program { name: "inactive";
760             signal: "elm,state,inactive";
761             source: "elm";
762             action: STATE_SET "default" 0.0;
763             target: "indicator1";
764             target: "indicator2";
765             transition: LINEAR 0.2;
766          }
767       }
768    }