[Timepicker] UX1.1: popup spinner text color is changed in light theme and spinner...
[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, timer_id_2, timer_flag_2;
23          public index_hide_timer(val) {
24             if (get_int(timer_flag) == 1)
25                run_program(PROGRAM:"index0.hide");
26             return 0;
27          }
28          public left_line_hide_timer(val) {
29             if (get_int(timer_flag_2) == 1)
30                run_program(PROGRAM:"left.line.dim");
31             return 0;
32          }
33       }
34       images {
35          image: "00_fast_scroll_popup_bg.png" COMP;
36       }
37       parts {
38          part { name: "clip";
39             scale: 1;
40             type: RECT;
41             mouse_events:  0;
42             description { state: "default" 0.0;
43                visible:  0;
44                color: 255 255 255 0;
45             }
46             description { state: "active" 0.0;
47                visible:  1;
48                color: 255 255 255 255;
49             }
50          }
51          part { name: "clip2";
52             scale: 1;
53             type: RECT;
54             mouse_events:  0;
55             clip_to: "clip";
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: "elm.dragable.index.1";
66             type: RECT;
67             mouse_events: 0;
68             scale: 1;
69             dragable {
70                x: 0 0 0;
71                y: 1 1 0;
72                confine: "elm.swallow.index.0";
73             }
74             description { state: "default" 0.0;
75                visible: 0;
76                fixed: 1 1;
77                min: 20 38;
78                rel1 {
79                   relative: 0.5  0.5;
80                   offset:   0    0;
81                   to: "elm.swallow.index.0";
82                }
83                rel2 {
84                   relative: 0.5  0.5;
85                   offset:   0    0;
86                   to: "elm.swallow.index.0";
87                }
88             }
89          }
90          part { name: "index.top.padding";
91             type: RECT;
92             scale: 1;
93             description {
94                align: 0.5 0.0;
95                min: 0 INDEX_PADDING_SIZE_INC;
96                visible: 0;
97                fixed: 0 1;
98                rel1 {
99                   to_x: "elm.swallow.index.0";
100                   relative: 0.0 0.0;
101                }
102                rel2 {
103                   to_x: "elm.swallow.index.0";
104                   relative: 1.0 0.0;
105                }
106             }
107          }
108          part { name: "index.bottom.padding";
109             type: RECT;
110             scale: 1;
111             description {
112                align: 0.5 1.0;
113                min: 0 INDEX_PADDING_SIZE_INC;
114                visible: 0;
115                fixed: 0 1;
116                rel1 {
117                   to_x: "elm.swallow.index.0";
118                   relative: 0.0 1.0;
119                }
120                rel2 {
121                   to_x: "elm.swallow.index.0";
122                   relative: 1.0 1.0;
123                }
124             }
125          }
126          part { name: "bg";
127             type: RECT;
128             clip_to: "clip";
129             scale: 1;
130             description { state: "default" 0.0;
131                rel1.to: "index.top.padding";
132                rel2.to: "index.bottom.padding";
133                color: INDEX_SCROLL_BG_COLOR_INC;
134             }
135          }
136          part { name: "left.line";
137             type: RECT;
138             clip_to: "clip";
139             scale: 1;
140             description { state: "default" 0.0;
141                align: 0.0 0.5;
142                min: INDEX_SCROLL_BG_LINE_WIDTH_INC 0;
143                fixed: 1 1;
144                rel1 {
145                   to: "bg";
146                   relative: 0.0 0.0;
147                }
148                rel2 {
149                   to: "bg";
150                   relative: 0.0 1.0;
151                }
152                color: INDEX_SCROLL_BG_LINE_COLOR_INC;
153             }
154             description { state: "active" 0.0;
155                inherit: "default" 0.0;
156                color: INDEX_SCROLL_BG_LINE_ACTIVE_COLOR_INC;
157             }
158          }
159          part { name: "elm.swallow.index.0";
160             type: SWALLOW;
161             clip_to: "clip";
162             scale: 1;
163             description { state: "default" 0.0;
164                visible: 1;
165                align: 1.0 0.5;
166                fixed: 1 1;
167                rel1 {
168                   to_y: "index.top.padding";
169                   relative: 1.0 1.0;
170                }
171                rel2 {
172                   to_y: "index.bottom.padding";
173                   relative: 1.0 0.0;
174                }
175                color: 255 255 255 255;
176             }
177             description { state: "up" 0.0;
178                  rel1.relative: 1.0 0.0;
179                  rel2.relative: 1.0 0.0;
180                  align: 1.0 1.0;
181                  fixed: 1 1;
182             }
183             description { state: "down" 0.0;
184                  rel1.relative: 1.0 1.0;
185                  rel2.relative: 1.0 1.0;
186                  align: 1.0 0.0;
187                  fixed: 1 1;
188             }
189          }
190          part { name: "button_image";
191             scale: 1;
192             clip_to: "clip2";
193             description { state: "default" 0.0;
194                align: 0.5 0.5;
195                fixed: 1 1;
196                rel1 {
197                   to_x: "left.padding";
198                   to_y: "top.padding";
199                }
200                rel2 {
201                   to_x: "right.padding";
202                   to_y: "bottom.padding";
203                }
204                image {
205                   normal: "00_fast_scroll_popup_bg.png";
206                   border: INDEX_POPUP_BG_NINEPATCH_INC;
207                   border_scale: 1;
208                }
209                image.middle: 1;
210             }
211          }
212          part { name: "top.padding";
213             type: RECT;
214             scale: 1;
215             clip_to: "clip2";
216             description {
217                state: "default" 0.0;
218                align: 0.5 1.0;
219                min: 0 INDEX_POPUP_TOP_PADDING_SIZE_INC;
220                fixed: 1 1;
221                rel1 {
222                   to: "elm.text";
223                   relative: 0.0 0.0;
224                }
225                rel2 {
226                   to: "elm.text";
227                   relative: 1.0 0.0;
228                }
229                visible: 0;
230             }
231          }
232          part { name: "bottom.padding";
233             type: RECT;
234             scale: 1;
235             clip_to: "clip2";
236             description {
237                state: "default" 0.0;
238                align: 0.5 0.0;
239                min: 0 INDEX_POPUP_BOTTOM_PADDING_SIZE_INC;
240                fixed: 1 1;
241                rel1 {
242                   to: "elm.text";
243                   relative: 0.0 1.0;
244                }
245                rel2 {
246                   to: "elm.text";
247                   relative: 1.0 1.0;
248                }
249                visible: 0;
250             }
251          }
252          part { name: "left.padding";
253             type: RECT;
254             scale: 1;
255             clip_to: "clip2";
256             description {
257                state: "default" 0.0;
258                align: 1.0 0.5;
259                min: INDEX_POPUP_LEFT_PADDING_SIZE_INC 0;
260                fixed: 1 1;
261                rel1 {
262                   to: "elm.text";
263                   relative: 0.0 0.0;
264                }
265                rel2 {
266                   to: "elm.text";
267                   relative: 0.0 1.0;
268                }
269                visible: 0;
270             }
271          }
272          part { name: "right.padding";
273             type: RECT;
274             scale: 1;
275             clip_to: "clip2";
276             description {
277                state: "default" 0.0;
278                align: 0.0 0.5;
279                min: INDEX_POPUP_RIGHT_PADDING_SIZE_INC 0;
280                fixed: 1 1;
281                rel1 {
282                   to: "elm.text";
283                   relative: 1.0 0.0;
284                }
285                rel2 {
286                   to: "elm.text";
287                   relative: 1.0 1.0;
288                }
289                visible: 0;
290             }
291          }
292          part {
293             name: "elm.text";
294             type: "TEXT";
295             mouse_events: 0;
296             scale: 1;
297             clip_to: "clip2";
298             description {
299                state: "default" 0.0;
300                align: 0.5 0.5;
301                fixed: 1 1;
302                min: INDEX_POPUP_TEXT_WIDTH_INC INDEX_POPUP_TEXT_HEIGHT_INC;
303                rel1 {
304                   relative: 0.5 0.5;
305                }
306                rel2 {
307                   relative: 0.5 0.5;
308                }
309                color: INDEX_POPUP_TEXT_COLOR_INC;
310                text {
311                   font: "Tizen:style=Medium";
312                   size: INDEX_POPUP_TEXT_SIZE_INC;
313                   min: 1 1;
314                   text_class: "tizen";
315                }
316             }
317          }
318          part { name: "elm.dragable.pointer";
319             type: RECT;
320             scale: 1;
321             mouse_events: 0;
322             dragable {
323                x: 1 1 0;
324                y: 1 1 0;
325             }
326             clip_to: "clip";
327             description { state: "default" 0.0;
328                fixed: 1 1;
329                min: 8 8;
330                max: 8 8;
331                rel1 {
332                   relative: 0.0 0.0;
333                   offset:   0 0;
334                }
335                rel2 {
336                   relative: 0.0 0.0;
337                   offset:   0 0;
338                }
339                color: 0 0 0 0;
340             }
341          }
342          part { name: "elm.swallow.event.0";
343             type: SWALLOW;
344             scale: 1;
345             description { state: "default" 0.0;
346                fixed: 1 1;
347                align: 1.0 0.5;
348                rel1 {
349                   relative: 1.0 0.0;
350                   offset: -1 0;
351                }
352                rel2 {
353                   relative: 1.0 1.0;
354                   offset: -1 -1;
355                }
356             }
357             description { state: "inactive" 0.0;
358                inherit: "default" 0.0;
359                visible: 0;
360             }
361          }
362          part {
363             name: "access";
364             type: RECT;
365             description { state: "default" 0.0;
366                fixed: 1 1;
367                rel1 {
368                   to: "elm.swallow.index.0";
369                   offset: -3 0;
370                }
371                rel2 {
372                   to: "elm.swallow.index.0";
373                }
374                color: 0 0 0 0;
375                visible: 0;
376             }
377             description { state: "active" 0.0;
378                inherit: "default" 0.0;
379                visible: 1;
380             }
381          }
382       }
383       programs {
384          program { name: "load";
385             signal: "load";
386             source: "";
387             script {
388                run_program(PROGRAM:"initial.index0.active");
389                run_program(PROGRAM:"initial.left.line.active");
390             }
391          }
392          program { name: "drag2";
393             signal: "drag,set";
394             source: "elm.dragable.index.1";
395             script {
396                new Float:dx;
397                new Float:dy;
398                get_drag(PART:"elm.dragable.index.1", dx, dy);
399                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
400                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
401             }
402          }
403          program { name: "initial.index0.active";
404             action: STATE_SET "active" 0.0;
405             target: "clip";
406             after: "index0.inactive";
407          }
408          program { name: "index0.active";
409             signal: "elm,state,active";
410             source: "elm";
411             action: STATE_SET "active" 0.0;
412             target: "clip";
413             after: "disable_timer";
414          }
415          program { name: "index0.inactive";
416             signal: "elm,state,inactive";
417             source: "elm";
418             script {
419                new v;
420                v = get_int(timer_id);
421                if (v > 0) cancel_timer(v);
422                run_program(PROGRAM:"enable_timer");
423                v = timer(2.0, "index_hide_timer", 0);
424                set_int(timer_id, v);
425             }
426          }
427          program { name: "index0.hide";
428             action: STATE_SET "default" 0.0;
429             transition: DECELERATE 0.3;
430             target: "clip";
431             after: "disable_timer";
432          }
433          program { name: "initial.left.line.active";
434             action: STATE_SET "active" 0.0;
435             target: "left.line";
436             after: "left.line.inactive";
437          }
438          program { name: "left.line.active";
439             signal: "mouse,down,1";
440             source: "elm.swallow.event.0";
441             action: STATE_SET "active" 0.0;
442             target: "left.line";
443             after: "disable_timer_2";
444          }
445          program { name: "left.line.inactive";
446             signal: "mouse,up,1";
447             source: "elm.swallow.event.0";
448             script {
449                new v;
450                v = get_int(timer_id_2);
451                if (v > 0) cancel_timer(v);
452                run_program(PROGRAM:"enable_timer_2");
453                v = timer(2.0, "left_line_hide_timer", 0);
454                set_int(timer_id_2, v);
455             }
456          }
457          program { name: "left.line.dim";
458             action: STATE_SET "default" 0.0;
459             transition: DECELERATE 0.3;
460             target: "left.line";
461             after: "disable_timer_2";
462          }
463          program { name: "index.active";
464             signal: "elm,indicator,state,active";
465             source: "elm";
466             action: STATE_SET "active" 0.0;
467             target: "clip2";
468          }
469          program { name: "index.inactive";
470             signal: "elm,indicator,state,inactive";
471             source: "elm";
472             action: STATE_SET "default" 0.0;
473             transition: DECELERATE 0.3;
474             target: "clip2";
475          }
476          program { name: "event.inactive";
477             signal: "elm,priority,up";
478             source: "elm";
479             action: STATE_SET "inactive" 0.0;
480             target: "elm.swallow.event.0";
481          }
482          program { name: "index.up";
483             signal: "elm,priority,up";
484             source: "elm";
485             action: STATE_SET "up" 0.0;
486             target: "elm.swallow.index.0";
487             after: "index.go.down";
488          }
489          program { name: "index.go.down";
490             action: STATE_SET "default" 0.0;
491             transition: LINEAR 0.3;
492             target: "elm.swallow.index.0";
493             after: "event.active";
494          }
495          program { name: "event.inactive2";
496             signal: "elm,priority,down";
497             source: "elm";
498             action: STATE_SET "inactive" 0.0;
499             target: "elm.swallow.event.0";
500          }
501          program { name: "index.down";
502             signal: "elm,priority,down";
503             source: "elm";
504             action: STATE_SET "down" 0.0;
505             target: "elm.swallow.index.0";
506             after: "index.go.up";
507          }
508          program { name: "index.go.up";
509             action: STATE_SET "default" 0.0;
510             transition: LINEAR 0.3;
511             target: "elm.swallow.index.0";
512             after: "event.active";
513          }
514          program { name: "event.active";
515             action: STATE_SET "default" 0.0;
516             target: "elm.swallow.event.0";
517          }
518          program {
519             name: "access.active";
520             signal: "elm,access,state,active";
521             source: "elm";
522             action: STATE_SET "active" 0.0;
523             target: "access";
524          }
525          program {
526             name: "access.inactive";
527             signal: "elm,access,state,inactive";
528             source: "elm";
529             action: STATE_SET "default" 0.0;
530             target: "access";
531          }
532          program { name: "disable_timer";
533             script {
534                set_int(timer_flag, 0);
535             }
536          }
537          program { name: "enable_timer";
538             script {
539                set_int(timer_flag, 1);
540             }
541          }
542          program { name: "disable_timer_2";
543             script {
544                set_int(timer_flag_2, 0);
545             }
546          }
547          program { name: "enable_timer_2";
548             script {
549                set_int(timer_flag_2, 1);
550             }
551          }
552       }
553    }
554
555    group { name: "elm/index/item/vertical/default";
556       alias: "elm/index/item_odd/vertical/default";
557       data.item: "stacking" "above";
558       data.item: "selectraise" "on";
559       images {
560          image: "00_fast_scroll_rollover_bg_line_focus.png" COMP;
561       }
562       parts {
563          part { name: "scroll.bg";
564             type: RECT;
565             mouse_events: 0;
566             scale: 1;
567             description { state: "default" 0.0;
568                rel1.to: "elm.text";
569                rel2.to: "elm.text";
570                color: INDEX_SCROLL_BG_COLOR_INC;
571                visible: 0;
572             }
573             description { state: "active" 0.0;
574                inherit: "default" 0.0;
575                visible: 1;
576             }
577          }
578          part { name: "divider";
579             type: RECT;
580             mouse_events: 0;
581             scale: 1;
582             description {
583                state: "default" 0.0;
584                align: 0.5 1.0;
585                min: 0 INDEX_DIVIDER_WIDTH_INC;
586                fixed: 1 1;
587                rel1 {
588                   relative: 0.0 1.0;
589                   offset: 6 0;
590                }
591                rel2 {
592                   relative: 1.0 1.0;
593                   offset: -3 0;
594                }
595                color: INDEX_DIVIDER_COLOR_INC;
596             }
597             description {
598                state: "inactive" 0.0;
599                inherit: "default" 0.0;
600                visible: 0;
601             }
602          }
603          part { name: "focus.top";
604             type: RECT;
605             mouse_events: 0;
606             scale: 1;
607             description {
608                state: "default" 0.0;
609                align: 0.5 1.0;
610                min: 0 INDEX_SCROLL_BG_LINE_WIDTH_INC;
611                fixed: 1 1;
612                visible: 0;
613                rel1 {
614                   relative: 0.0 0.0;
615                }
616                rel2 {
617                   relative: 1.0 0.0;
618                }
619             }
620          }
621          part { name: "focus.bottom";
622             type: RECT;
623             mouse_events: 0;
624             scale: 1;
625             description {
626                state: "default" 0.0;
627                align: 0.5 0.0;
628                min: 0 INDEX_SCROLL_BG_LINE_WIDTH_INC;
629                fixed: 1 1;
630                visible: 0;
631                rel1 {
632                   to: "divider";
633                   relative: 0.0 0.0;
634                }
635                rel2 {
636                   to: "divider";
637                   relative: 1.0 0.0;
638                }
639             }
640          }
641          part { name: "right.padding";
642             type: RECT;
643             mouse_events: 0;
644             scale: 1;
645             description {
646                state: "default" 0.0;
647                align: 1.0 0.5;
648                min: INDEX_ITEM_PADDING_SIZE_INC 0;
649                fixed: 1 1;
650                visible: 0;
651                rel1 {
652                   relative: 1.0 0.0;
653                }
654                rel2 {
655                   relative: 1.0 1.0;
656                }
657             }
658          }
659          part { name: "item.bg";
660             type: IMAGE;
661             mouse_events: 0;
662             scale: 1;
663             description {
664                state: "default" 0.0;
665                visible: 0;
666                rel1 {
667                   to_y: "focus.top";
668                }
669                rel2 {
670                   to_x: "right.padding";
671                   to_y: "focus.bottom";
672                   relative: 0.0 1.0;
673                }
674                image {
675                   normal: "00_fast_scroll_rollover_bg_line_focus.png";
676                   border: INDEX_BG_NINEPATCH_INC;
677                   border_scale: 1;
678                }
679             }
680             description {
681                state: "active" 0.0;
682                inherit: "default" 0.0;
683                visible: 1;
684             }
685          }
686          part { name: "elm.text";
687             type: TEXT;
688             mouse_events: 0;
689             scale: 1;
690             description {
691                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
692                align: 0.5 0.5;
693                state: "default" 0.0;
694                rel1.relative: 0.0 0.0;
695                rel2.relative: 1.0 1.0;
696                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
697                text {
698                   font: "Tizen:style=Bold";
699                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
700                   align: 0.5 0.5;
701                   text_class: "tizen";
702                }
703             }
704             description { state: "active" 0.0;
705                inherit: "default" 0.0;
706                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
707             }
708          }
709       }
710       programs {
711          program { name: "active";
712             signal: "elm,state,active";
713             source: "elm";
714             action: STATE_SET "active" 0.0;
715             transition: DECELERATE 0.0;
716             target: "elm.text";
717             target: "item.bg";
718             target: "scroll.bg";
719          }
720          program { name: "inactive";
721             signal: "elm,state,inactive";
722             source: "elm";
723             action: STATE_SET "default" 0.0;
724             transition: DECELERATE 0.0;
725             target: "elm.text";
726             target: "item.bg";
727             target: "scroll.bg";
728          }
729          program {
730             signal: "elm,last,item";
731             source: "elm";
732             action: STATE_SET "inactive" 0.0;
733             target: "divider";
734          }
735       }
736    }
737    group {
738       name: "elm/index/base/vertical/pagecontrol";
739       alias: "elm/index/base/horizontal/pagecontrol";
740       parts {
741          part { name: "clip";
742             type: RECT;
743             mouse_events:  0;
744             description { state: "default" 0.0;
745                visible:  0;
746                color: 255 255 255 0;
747             }
748             description { state: "active" 0.0;
749                visible:  1;
750                color: 255 255 255 255;
751             }
752          }
753          part { name: "elm.swallow.index.0";
754             type: SWALLOW;
755             scale: 1;
756             clip_to: "clip";
757             description {
758                state: "default" 0.0;
759                align: 0.5 0.5;
760                rel1.relative: 0.5 0.5;
761                rel2.relative: 0.5 0.5;
762             }
763          }
764          part { name: "elm.swallow.event.0";
765             type: SWALLOW;
766             description { state: "default" 0.0;
767                align: 0.5 0.5;
768             }
769          }
770       }
771       programs {
772          program { name: "active";
773             signal: "elm,state,active";
774             source: "elm";
775             action: STATE_SET "active" 0.0;
776             transition: DECELERATE 0.5;
777             target: "clip";
778          }
779          program { name: "inactive";
780             signal: "elm,state,inactive";
781             source: "elm";
782             action: STATE_SET "default" 0.0;
783             transition: DECELERATE 0.5;
784             target: "clip";
785          }
786       }
787    }
788    group {
789       name: "elm/index/item/vertical/pagecontrol";
790       alias: "elm/index/item_odd/vertical/pagecontrol";
791       alias: "elm/index/item/horizontal/pagecontrol";
792       alias: "elm/index/item_odd/horizontal/pagecontrol";
793       images {
794          image: "00_page_indicator_01.png" COMP;
795          image: "00_page_indicator_02.png" COMP;
796       }
797       parts {
798          part { name:"bg";
799             type : RECT;
800             scale: 1;
801             description { state: "default" 0.0;
802                min: INDEX_PAGECONTROL_IND_INC;
803                max: INDEX_PAGECONTROL_IND_INC;
804                visible: 0;
805                align: 0.5 0.5;
806             }
807          }
808          part { name: "indicator1";
809             type: IMAGE;
810             mouse_events: 0;
811             scale: 1;
812             description { state: "default" 0.0;
813                align: 0.5 0.5;
814                fixed: 1 1;
815                min: INDEX_PAGECONTROL_IND_MIN_INC;
816                max: INDEX_PAGECONTROL_IND_MIN_INC;
817                image {
818                   normal: "00_page_indicator_02.png";
819                }
820             }
821             description { state: "active" 0.0;
822                inherit: "default" 0.0;
823                visible: 0;
824             }
825          }
826          part { name: "indicator2";
827             type: IMAGE;
828             mouse_events: 0;
829             scale: 1;
830             description { state: "default" 0.0;
831                align: 0.5 0.5;
832                fixed: 1 1;
833                min: INDEX_PAGECONTROL_IND_MIN_INC;
834                max: INDEX_PAGECONTROL_IND_MIN_INC;
835                image.normal: "00_page_indicator_01.png";
836                visible: 0;
837             }
838             description { state: "active" 0.0;
839                inherit: "default" 0.0;
840                visible: 1;
841             }
842          }
843       }
844       programs {
845          program { name: "active";
846             signal: "elm,state,active";
847             source: "elm";
848             action: STATE_SET "active" 0.0;
849             target: "indicator1";
850             target: "indicator2";
851             transition: LINEAR 0.2;
852          }
853          program { name: "inactive";
854             signal: "elm,state,inactive";
855             source: "elm";
856             action: STATE_SET "default" 0.0;
857             target: "indicator1";
858             target: "indicator2";
859             transition: LINEAR 0.2;
860          }
861       }
862    }