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