[tab]changed icon+text style GUI
[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_LEFT_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_INC;
153             }
154             description { state: "active" 0.0;
155                inherit: "default" 0.0;
156                color: INDEX_LEFT_LINE_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          }
178          part { name: "button_image";
179             scale: 1;
180             clip_to: "clip2";
181             description { state: "default" 0.0;
182                align: 0.5 0.5;
183                fixed: 1 1;
184                rel1 {
185                   to_x: "left.padding";
186                   to_y: "top.padding";
187                }
188                rel2 {
189                   to_x: "right.padding";
190                   to_y: "bottom.padding";
191                }
192                image {
193                   normal: "00_fast_scroll_popup_bg.png";
194                   border: INDEX_POPUP_BG_NINEPATCH_INC;
195                   border_scale: 1;
196                }
197                image.middle: 1;
198             }
199          }
200          part { name: "top.padding";
201             type: RECT;
202             scale: 1;
203             clip_to: "clip2";
204             description {
205                state: "default" 0.0;
206                align: 0.5 1.0;
207                min: 0 INDEX_POPUP_TOP_PADDING_SIZE_INC;
208                fixed: 1 1;
209                rel1 {
210                   to: "elm.text";
211                   relative: 0.0 0.0;
212                }
213                rel2 {
214                   to: "elm.text";
215                   relative: 1.0 0.0;
216                }
217                visible: 0;
218             }
219          }
220          part { name: "bottom.padding";
221             type: RECT;
222             scale: 1;
223             clip_to: "clip2";
224             description {
225                state: "default" 0.0;
226                align: 0.5 0.0;
227                min: 0 INDEX_POPUP_BOTTOM_PADDING_SIZE_INC;
228                fixed: 1 1;
229                rel1 {
230                   to: "elm.text";
231                   relative: 0.0 1.0;
232                }
233                rel2 {
234                   to: "elm.text";
235                   relative: 1.0 1.0;
236                }
237                visible: 0;
238             }
239          }
240          part { name: "left.padding";
241             type: RECT;
242             scale: 1;
243             clip_to: "clip2";
244             description {
245                state: "default" 0.0;
246                align: 1.0 0.5;
247                min: INDEX_POPUP_LEFT_PADDING_SIZE_INC 0;
248                fixed: 1 1;
249                rel1 {
250                   to: "elm.text";
251                   relative: 0.0 0.0;
252                }
253                rel2 {
254                   to: "elm.text";
255                   relative: 0.0 1.0;
256                }
257                visible: 0;
258             }
259          }
260          part { name: "right.padding";
261             type: RECT;
262             scale: 1;
263             clip_to: "clip2";
264             description {
265                state: "default" 0.0;
266                align: 0.0 0.5;
267                min: INDEX_POPUP_RIGHT_PADDING_SIZE_INC 0;
268                fixed: 1 1;
269                rel1 {
270                   to: "elm.text";
271                   relative: 1.0 0.0;
272                }
273                rel2 {
274                   to: "elm.text";
275                   relative: 1.0 1.0;
276                }
277                visible: 0;
278             }
279          }
280          part {
281             name: "elm.text";
282             type: "TEXT";
283             mouse_events: 0;
284             scale: 1;
285             clip_to: "clip2";
286             description {
287                state: "default" 0.0;
288                align: 0.5 0.5;
289                fixed: 1 1;
290                min: INDEX_POPUP_TEXT_WIDTH_INC INDEX_POPUP_TEXT_HEIGHT_INC;
291                rel1 {
292                   relative: 0.5 0.5;
293                }
294                rel2 {
295                   relative: 0.5 0.5;
296                }
297                color: INDEX_POPUP_TEXT_COLOR_INC;
298                text {
299                   font: "Tizen:style=Medium";
300                   size: INDEX_POPUP_TEXT_SIZE_INC;
301                   min: 1 1;
302                   text_class: "tizen";
303                }
304             }
305          }
306          part { name: "elm.dragable.pointer";
307             type: RECT;
308             scale: 1;
309             mouse_events: 0;
310             dragable {
311                x: 1 1 0;
312                y: 1 1 0;
313             }
314             clip_to: "clip";
315             description { state: "default" 0.0;
316                fixed: 1 1;
317                min: 8 8;
318                max: 8 8;
319                rel1 {
320                   relative: 0.0 0.0;
321                   offset:   0 0;
322                }
323                rel2 {
324                   relative: 0.0 0.0;
325                   offset:   0 0;
326                }
327                color: 0 0 0 0;
328             }
329          }
330          part { name: "elm.swallow.event.0";
331             type: SWALLOW;
332             scale: 1;
333             description { state: "default" 0.0;
334                fixed: 1 1;
335                align: 1.0 0.5;
336                rel1 {
337                   relative: 1.0 0.0;
338                   offset: -1 0;
339                }
340                rel2 {
341                   relative: 1.0 1.0;
342                   offset: -1 -1;
343                }
344             }
345          }
346          part {
347             name: "access";
348             type: RECT;
349             description { state: "default" 0.0;
350                fixed: 1 1;
351                rel1 {
352                   to: "elm.swallow.index.0";
353                   offset: -3 0;
354                }
355                rel2 {
356                   to: "elm.swallow.index.0";
357                }
358                color: 0 0 0 0;
359                visible: 0;
360             }
361             description { state: "active" 0.0;
362                inherit: "default" 0.0;
363                visible: 1;
364             }
365          }
366       }
367       programs {
368          program { name: "load";
369             signal: "load";
370             source: "";
371             script {
372                run_program(PROGRAM:"initial.index0.active");
373                run_program(PROGRAM:"initial.left.line.active");
374             }
375          }
376          program { name: "drag2";
377             signal: "drag,set";
378             source: "elm.dragable.index.1";
379             script {
380                new Float:dx;
381                new Float:dy;
382                get_drag(PART:"elm.dragable.index.1", dx, dy);
383                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
384                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
385             }
386          }
387          program { name: "initial.index0.active";
388             action: STATE_SET "active" 0.0;
389             target: "clip";
390             after: "index0.inactive";
391          }
392          program { name: "index0.active";
393             signal: "elm,state,active";
394             source: "elm";
395             action: STATE_SET "active" 0.0;
396             target: "clip";
397             after: "disable_timer";
398          }
399          program { name: "index0.inactive";
400             signal: "elm,state,inactive";
401             source: "elm";
402             script {
403                new v;
404                v = get_int(timer_id);
405                if (v > 0) cancel_timer(v);
406                run_program(PROGRAM:"enable_timer");
407                v = timer(2.0, "index_hide_timer", 0);
408                set_int(timer_id, v);
409             }
410          }
411          program { name: "index0.hide";
412             action: STATE_SET "default" 0.0;
413             transition: DECELERATE 0.3;
414             target: "clip";
415             after: "disable_timer";
416          }
417          program { name: "initial.left.line.active";
418             action: STATE_SET "active" 0.0;
419             target: "left.line";
420             after: "left.line.inactive";
421          }
422          program { name: "left.line.active";
423             signal: "mouse,down,1";
424             source: "elm.swallow.event.0";
425             action: STATE_SET "active" 0.0;
426             target: "left.line";
427             after: "disable_timer_2";
428          }
429          program { name: "left.line.inactive";
430             signal: "mouse,up,1";
431             source: "elm.swallow.event.0";
432             script {
433                new v;
434                v = get_int(timer_id_2);
435                if (v > 0) cancel_timer(v);
436                run_program(PROGRAM:"enable_timer_2");
437                v = timer(2.0, "left_line_hide_timer", 0);
438                set_int(timer_id_2, v);
439             }
440          }
441          program { name: "left.line.dim";
442             action: STATE_SET "default" 0.0;
443             transition: DECELERATE 0.3;
444             target: "left.line";
445             after: "disable_timer_2";
446          }
447          program { name: "index.active";
448             signal: "elm,indicator,state,active";
449             source: "elm";
450             action: STATE_SET "active" 0.0;
451             target: "clip2";
452          }
453          program { name: "index.inactive";
454             signal: "elm,indicator,state,inactive";
455             source: "elm";
456             action: STATE_SET "default" 0.0;
457             transition: DECELERATE 0.3;
458             target: "clip2";
459          }
460          program {
461             name: "access.active";
462             signal: "elm,access,state,active";
463             source: "elm";
464             action: STATE_SET "active" 0.0;
465             target: "access";
466          }
467          program {
468             name: "access.inactive";
469             signal: "elm,access,state,inactive";
470             source: "elm";
471             action: STATE_SET "default" 0.0;
472             target: "access";
473          }
474          program { name: "disable_timer";
475             script {
476                set_int(timer_flag, 0);
477             }
478          }
479          program { name: "enable_timer";
480             script {
481                set_int(timer_flag, 1);
482             }
483          }
484          program { name: "disable_timer_2";
485             script {
486                set_int(timer_flag_2, 0);
487             }
488          }
489          program { name: "enable_timer_2";
490             script {
491                set_int(timer_flag_2, 1);
492             }
493          }
494       }
495    }
496
497    group { name: "elm/index/item/vertical/default";
498       alias: "elm/index/item_odd/vertical/default";
499       data.item: "stacking" "above";
500       data.item: "selectraise" "on";
501       images {
502          image: "00_fast_scroll_rollover_bg_line_focus.png" COMP;
503       }
504       parts {
505          part { name: "scroll.bg";
506             type: RECT;
507             mouse_events: 0;
508             scale: 1;
509             description { state: "default" 0.0;
510                rel1.to: "elm.text";
511                rel2.to: "elm.text";
512                color: INDEX_SCROLL_BG_COLOR_INC;
513                visible: 0;
514             }
515             description { state: "active" 0.0;
516                inherit: "default" 0.0;
517                visible: 1;
518             }
519          }
520          part { name: "divider";
521             type: RECT;
522             mouse_events: 0;
523             scale: 1;
524             description {
525                state: "default" 0.0;
526                align: 0.5 1.0;
527                min: 0 INDEX_BOTTOM_LINE_WIDTH_INC;
528                fixed: 1 1;
529                rel1 {
530                   relative: 0.0 1.0;
531                   offset: 6 0;
532                }
533                rel2 {
534                   relative: 1.0 1.0;
535                   offset: -3 0;
536                }
537                color: INDEX_DIVIDER_COLOR_INC;
538             }
539             description {
540                state: "inactive" 0.0;
541                inherit: "default" 0.0;
542                visible: 0;
543             }
544          }
545          part { name: "focus.top";
546             type: RECT;
547             mouse_events: 0;
548             scale: 1;
549             description {
550                state: "default" 0.0;
551                align: 0.5 1.0;
552                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
553                fixed: 1 1;
554                visible: 0;
555                rel1 {
556                   relative: 0.0 0.0;
557                }
558                rel2 {
559                   relative: 1.0 0.0;
560                }
561             }
562          }
563          part { name: "focus.bottom";
564             type: RECT;
565             mouse_events: 0;
566             scale: 1;
567             description {
568                state: "default" 0.0;
569                align: 0.5 0.0;
570                min: 0 INDEX_LEFT_LINE_WIDTH_INC;
571                fixed: 1 1;
572                visible: 0;
573                rel1 {
574                   to: "divider";
575                   relative: 0.0 0.0;
576                }
577                rel2 {
578                   to: "divider";
579                   relative: 1.0 0.0;
580                }
581             }
582          }
583          part { name: "right.padding";
584             type: RECT;
585             mouse_events: 0;
586             scale: 1;
587             description {
588                state: "default" 0.0;
589                align: 1.0 0.5;
590                min: INDEX_ITEM_PADDING_SIZE_INC 0;
591                fixed: 1 1;
592                visible: 0;
593                rel1 {
594                   relative: 1.0 0.0;
595                }
596                rel2 {
597                   relative: 1.0 1.0;
598                }
599             }
600          }
601          part { name: "item.bg";
602             type: IMAGE;
603             mouse_events: 0;
604             scale: 1;
605             description {
606                state: "default" 0.0;
607                visible: 0;
608                rel1 {
609                   to_y: "focus.top";
610                }
611                rel2 {
612                   to_x: "right.padding";
613                   to_y: "focus.bottom";
614                   relative: 0.0 1.0;
615                }
616                image {
617                   normal: "00_fast_scroll_rollover_bg_line_focus.png";
618                   border: INDEX_BG_NINEPATCH_INC;
619                   border_scale: 1;
620                }
621             }
622             description {
623                state: "active" 0.0;
624                inherit: "default" 0.0;
625                visible: 1;
626             }
627          }
628          part { name: "elm.text";
629             type: TEXT;
630             mouse_events: 0;
631             scale: 1;
632             description {
633                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
634                align: 0.5 0.5;
635                state: "default" 0.0;
636                rel1.relative: 0.0 0.0;
637                rel2.relative: 1.0 1.0;
638                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
639                text {
640                   font: "Tizen:style=Bold";
641                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
642                   align: 0.5 0.5;
643                   text_class: "tizen";
644                }
645             }
646             description { state: "active" 0.0;
647                inherit: "default" 0.0;
648                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
649             }
650          }
651       }
652       programs {
653          program { name: "active";
654             signal: "elm,state,active";
655             source: "elm";
656             action: STATE_SET "active" 0.0;
657             transition: DECELERATE 0.0;
658             target: "elm.text";
659             target: "item.bg";
660             target: "scroll.bg";
661          }
662          program { name: "inactive";
663             signal: "elm,state,inactive";
664             source: "elm";
665             action: STATE_SET "default" 0.0;
666             transition: DECELERATE 0.0;
667             target: "elm.text";
668             target: "item.bg";
669             target: "scroll.bg";
670          }
671          program {
672             signal: "elm,last,item";
673             source: "elm";
674             action: STATE_SET "inactive" 0.0;
675             target: "divider";
676          }
677       }
678    }
679    group {
680       name: "elm/index/base/vertical/pagecontrol";
681       alias: "elm/index/base/horizontal/pagecontrol";
682       parts {
683          part { name: "clip";
684             type: RECT;
685             mouse_events:  0;
686             description { state: "default" 0.0;
687                visible:  0;
688                color: 255 255 255 0;
689             }
690             description { state: "active" 0.0;
691                visible:  1;
692                color: 255 255 255 255;
693             }
694          }
695          part { name: "elm.swallow.index.0";
696             type: SWALLOW;
697             scale: 1;
698             clip_to: "clip";
699             description {
700                state: "default" 0.0;
701                align: 0.5 0.5;
702                rel1.relative: 0.5 0.5;
703                rel2.relative: 0.5 0.5;
704             }
705          }
706          part { name: "elm.swallow.event.0";
707             type: SWALLOW;
708             description { state: "default" 0.0;
709                align: 0.5 0.5;
710             }
711          }
712       }
713       programs {
714          program { name: "active";
715             signal: "elm,state,active";
716             source: "elm";
717             action: STATE_SET "active" 0.0;
718             transition: DECELERATE 0.5;
719             target: "clip";
720          }
721          program { name: "inactive";
722             signal: "elm,state,inactive";
723             source: "elm";
724             action: STATE_SET "default" 0.0;
725             transition: DECELERATE 0.5;
726             target: "clip";
727          }
728       }
729    }
730    group {
731       name: "elm/index/item/vertical/pagecontrol";
732       alias: "elm/index/item_odd/vertical/pagecontrol";
733       alias: "elm/index/item/horizontal/pagecontrol";
734       alias: "elm/index/item_odd/horizontal/pagecontrol";
735       images {
736          image: "00_page_indicator_01.png" COMP;
737          image: "00_page_indicator_02.png" COMP;
738       }
739       parts {
740          part { name:"bg";
741             type : RECT;
742             scale: 1;
743             description { state: "default" 0.0;
744                min: INDEX_PAGECONTROL_IND_INC;
745                max: INDEX_PAGECONTROL_IND_INC;
746                visible: 0;
747                align: 0.5 0.5;
748             }
749          }
750          part { name: "indicator1";
751             type: IMAGE;
752             mouse_events: 0;
753             scale: 1;
754             description { state: "default" 0.0;
755                align: 0.5 0.5;
756                fixed: 1 1;
757                min: INDEX_PAGECONTROL_IND_MIN_INC;
758                max: INDEX_PAGECONTROL_IND_MIN_INC;
759                image {
760                   normal: "00_page_indicator_02.png";
761                }
762             }
763             description { state: "active" 0.0;
764                inherit: "default" 0.0;
765                visible: 0;
766             }
767          }
768          part { name: "indicator2";
769             type: IMAGE;
770             mouse_events: 0;
771             scale: 1;
772             description { state: "default" 0.0;
773                align: 0.5 0.5;
774                fixed: 1 1;
775                min: INDEX_PAGECONTROL_IND_MIN_INC;
776                max: INDEX_PAGECONTROL_IND_MIN_INC;
777                image.normal: "00_page_indicator_01.png";
778                visible: 0;
779             }
780             description { state: "active" 0.0;
781                inherit: "default" 0.0;
782                visible: 1;
783             }
784          }
785       }
786       programs {
787          program { name: "active";
788             signal: "elm,state,active";
789             source: "elm";
790             action: STATE_SET "active" 0.0;
791             target: "indicator1";
792             target: "indicator2";
793             transition: LINEAR 0.2;
794          }
795          program { name: "inactive";
796             signal: "elm,state,inactive";
797             source: "elm";
798             action: STATE_SET "default" 0.0;
799             target: "indicator1";
800             target: "indicator2";
801             transition: LINEAR 0.2;
802          }
803       }
804    }