[index]Fixed S1-1971, S1-2168 issue: text item is cut partially
[profile/ivi/efl-theme-tizen.git] / themes / widgets / index.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved 
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8  * software is owned by Samsung and you shall not disclose such Confidential
9  * Information and shall use it only in accordance with the terms of the license
10  * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11  * representations or warranties about the suitability of the software, either
12  * express or implied, including but not limited to the implied warranties of
13  * merchantability, fitness for a particular purpose, or non-infringement.
14  * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15  * of or releated to this software.
16  *
17  */
18
19    group { name: "elm/index/base/vertical/default";
20       script {
21          public timer_flag;
22          public index_hide_timer(val) {
23             if (get_int(timer_flag) == 1)
24                run_program(PROGRAM:"index0.inactive");
25             return 0;
26          }
27       }
28       images {
29          image: "00_fast_scroll_popup_bg.png" COMP;
30          image: "00_fast_scroll_rollover_bg.png" COMP;
31          image: "00_fast_scroll_rollover_index_1_bg.png" COMP;
32       }
33       data{
34          item: "min_obj_height" "32";
35          item: "min_1st_level_obj_height" "32";
36          item: "special_char" "*";
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             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                fixed: 1 1;
76                min: 20 38;
77                rel1 {
78                   relative: 0.5  0.5;
79                   offset:   0    0;
80                   to: "elm.swallow.index.0";
81                }
82                rel2 {
83                   relative: 0.5  0.5;
84                   offset:   0    0;
85                   to: "elm.swallow.index.0";
86                }
87             }
88          }
89          part { name: "elm.swallow.index.1.padding.right";
90             type: RECT;
91             scale: 1;
92             description { state: "default" 0.0;
93                min: INDEX_LEVEL_PADDING_INC 0;
94                fixed: 1 0;
95                align: 1.0 0.0;
96                rel1 {
97                   relative: 1.0 0.0;
98                   offset: 0 0;
99                }
100                rel2 {
101                   relative: 1.0 0.0;
102                   offset: 0 0;
103                }
104                color: 0 0 0 0;
105             }
106          }
107          part { name: "index.1.bg.image.middle";
108             mouse_events: 0;
109             scale: 1;
110             description { state: "default" 0.0;
111                visible: 0;
112                rel1 {
113                   to: "elm.swallow.index.1";
114                   offset: 0 0;
115                }
116                rel2 {
117                   to: "elm.swallow.index.1";
118                   offset: 0 0;
119                }
120                image {
121                   normal: "00_fast_scroll_rollover_index_1_bg.png";
122                   border: INDEX_BG_NINEPATCH_INC;
123                   border_scale: 1;
124                }
125                fill.smooth: 0;
126             }
127             description { state: "active" 0.0;
128                inherit: "default" 0.0;
129                visible: 1;
130             }
131          }
132          part { name: "elm.swallow.index.1";
133             type: SWALLOW;
134             scale: 1;
135             clip_to: "clip2";
136             description { state: "default" 0.0;
137                align: 0.5 0.5;
138                rel1 {
139                   to_y: "elm.dragable.index.1";
140                   relative: 1.0 0.5;
141                   offset: -1 0;
142                }
143                rel2 {
144                   to_y: "elm.dragable.index.1";
145                   relative: 1.0 0.5;
146                   offset: -1 -1;
147                }
148                color: 255 255 255 0;
149             }
150             description { state: "active" 0.0;
151                inherit: "default" 0.0;
152                rel1 {
153                   to_x: "elm.swallow.index.1.padding.right";
154                   relative: 0.0 0.5;
155                   offset: 0 0;
156                }
157                rel2 {
158                   to_x: "elm.swallow.index.1.padding.right";
159                   relative: 0.0 0.5;
160                   offset: 0 -1;
161                }
162                color: 255 255 255 255;
163             }
164          }
165          part { name: "index.0.bg.image.middle";
166             mouse_events: 0;
167             scale: 1;
168             description { state: "default" 0.0;
169                rel1 {
170                   to: "elm.swallow.index.0";
171                   offset: 0 0;
172                }
173                rel2 {
174                   to: "elm.swallow.index.0";
175                   offset: 0 0;
176                }
177                image {
178                   normal: "00_fast_scroll_rollover_bg.png";
179                   border: INDEX_BG_NINEPATCH_INC;
180                   border_scale: 1;
181                }
182                fill.smooth: 0;
183                visible: 0;
184                }
185             description { state: "active" 0.0;
186                inherit: "default" 0.0;
187                visible: 1;
188             }
189         }
190         part { name: "elm.swallow.index.0";
191             type: SWALLOW;
192             clip_to: "clip";
193             scale: 1;
194             description { state: "default" 0.0;
195                visible: 1;
196                align: 1.0 0.5;
197                rel1 {
198                   relative: 1.0 0.5;
199                   offset: -1 0;
200                }
201                rel2 {
202                   relative: 1.0 0.5;
203                   offset: -1 0;
204                }
205                color: 255 255 255 50;
206             }
207             description { state: "active" 0.0;
208                inherit: "default" 0.0;
209                color: 255 255 255 255;
210             }
211          }
212          part { name: "button_image_padding";
213             mouse_events: 0;
214             scale: 1;
215             clip_to: "clip";
216             type: RECT;
217             description { state: "default" 0.0;
218                align: 0.0 0.0;
219                min: 0 0;
220                max: 0 0;
221                fixed: 0 1;
222                rel1 {
223                   relative: 0.5 0.5;
224                   offset: 0 0;
225                }
226                rel2 {
227                   relative: 0.5 0.5;
228                   offset: 0 0;
229                }
230             }
231          }
232          part { name: "button_image";
233             scale: 1;
234             clip_to: "clip";
235             description { state: "default" 0.0;
236                align: 0.5 0.5;
237                min: INDEX_1ST_LEVEL_POPUP_WIDTH_INC INDEX_POPUP_HEIGHT_INC;
238                fixed: 1 1;
239                rel1 {
240                   to: "elm.text";
241                   relative: 0.0 0.0;
242                   offset: -10 0;
243                }
244                rel2 {
245                   to: "elm.text";
246                   relative: 1.067 1.083;
247                   offset: 10 0;
248                }
249                image {
250                   normal: "00_fast_scroll_popup_bg.png";
251                   border: INDEX_POPUP_BG_NINEPATCH_INC;
252                   border_scale: 1;
253                }
254                image.middle: 1;
255             }
256             description { state: "invisible" 0.0;
257                inherit: "default" 0.0;
258                visible: 0;
259             }
260             description { state: "index1" 0.0;
261                inherit: "default" 0.0;
262                min: INDEX_2ND_LEVEL_POPUP_WIDTH_INC INDEX_POPUP_HEIGHT_INC;
263             }
264          }
265          part {
266             name: "elm.text";
267             type: "TEXT";
268             mouse_events: 0;
269             scale: 1;
270             clip_to: "clip";
271             description {
272                state: "default" 0.0;
273                align: 0.5 0.5;
274                fixed: 1 1;
275                min: 40 20;
276                visible: 0;
277                rel1 {
278                   to_y: "button_image_padding";
279                   relative: 0.5 1.0;
280                }
281                rel2 {
282                   to_y: "button_image_padding";
283                   relative: 0.5 1.0;
284                }
285                color: INDEX_POPUP_TEXT_COLOR_INC;
286                color3: 0 0 0 64;
287                text {
288                   font: "SLP:style=Medium";
289                   size: INDEX_POPUP_TEXT_SIZE_INC;
290                   min: 1 1;
291                }
292             }
293             description { state: "active" 0.0;
294                inherit: "default" 0.0;
295                visible: 1;
296             }
297          }
298          part { name: "elm.dragable.pointer";
299             type: RECT;
300             scale: 1;
301             mouse_events: 0;
302             dragable {
303                x: 1 1 0;
304                y: 1 1 0;
305             }
306             clip_to: "clip";
307             description { state: "default" 0.0;
308                fixed: 1 1;
309                min: 8 8;
310                max: 8 8;
311                rel1 {
312                   relative: 0.0 0.0;
313                   offset:   0 0;
314                }
315                rel2 {
316                   relative: 0.0 0.0;
317                   offset:   0 0;
318                }
319                color: 0 0 0 0;
320             }
321          }
322          part { name: "elm.swallow.event.0.bottom.padding";
323             type: RECT;
324             scale: 1;
325             description { state: "default" 0.0;
326                min: 0 SOFTKEY_H;
327                fixed: 0 1;
328                align: 0.5 1.0;
329                rel1{
330                   relative: 1.0 1.0; offset: 0 0;
331                }
332                color: 0 0 0 0;
333             }
334          }
335          part { name: "elm.swallow.event.0";
336             type: SWALLOW;
337             scale: 1;
338             description { state: "default" 0.0;
339                fixed: 1 1;
340                align: 1.0 0.5;
341                rel1 {
342                   relative: 1.0 0.0;
343                   offset: -1 0;
344                }
345                rel2 {
346                   relative: 1.0 0.0;
347                   offset: -1 -1;
348                   to_y: "elm.swallow.event.0.bottom.padding";
349                }
350             }
351          }
352          part { name: "elm.swallow.event.1";
353             type: SWALLOW;
354             scale: 1;
355             description { state: "default" 0.0;
356                align: 1.0 0.5;
357                fixed: 1 1;
358                rel1 {
359                   to: "elm.swallow.index.1";
360                   relative: 0.0 0.0;
361                   offset: -1 0;
362                }
363                rel2 {
364                   to: "elm.swallow.index.1";
365                   relative: 0.0 1.0;
366                   offset: -1 -1;
367                }
368             }
369          }
370       }
371       programs {
372          program { name: "load";
373             signal: "load";
374             source: "";
375             script {
376                run_program(PROGRAM:"initial.index0.active");
377                run_program(PROGRAM:"button.image.hidden");
378                timer(2.0, "index_hide_timer", 0);
379             }
380          }
381          program { name: "drag2";
382             signal: "drag,set";
383             source: "elm.dragable.index.1";
384             script {
385                new Float:dx;
386                new Float:dy;
387                get_drag(PART:"elm.dragable.index.1", dx, dy);
388                custom_state(PART:"elm.dragable.index.1", "default", 0.0);
389                set_state_val(PART:"elm.dragable.index.1", STATE_ALIGNMENT, 0.5, dy);
390             }
391          }
392          program { name: "first_level_invisible";
393             signal: "hide_first_level";
394             source: "";
395             action: STATE_SET "index1" 0.0;
396             target: "button_image";
397          }
398          program { name: "2nd_level_invisible";
399             signal: "hide_2nd_level";
400             source: "";
401             action: STATE_SET "default" 0.0;
402             target: "button_image";
403          }
404          program { name: "index0.active";
405             signal: "elm,state,active";
406             source: "elm";
407             action: STATE_SET "active" 0.0;
408             transition: DECELERATE 0.3;
409             target: "elm.swallow.index.0";
410             target: "clip";
411             target: "index.0.bg.image.middle";
412             target: "elm.text";
413             after: "disable_timer";
414          }
415          program { name: "initial.index0.active";
416             action: STATE_SET "active" 0.0;
417             transition: DECELERATE 0.3;
418             target: "elm.swallow.index.0";
419             target: "clip";
420             target: "index.0.bg.image.middle";
421             after: "enable_timer";
422          }
423          program { name: "index0.inactive";
424             signal: "elm,state,inactive";
425             source: "elm";
426             action: STATE_SET "default" 0.0;
427             transition: DECELERATE 0.3;
428             target: "elm.swallow.index.0";
429             target: "clip";
430             target: "index.0.bg.image.middle";
431          }
432          program { name: "index1.inactive";
433             signal: "elm,state,level,0";
434             source: "elm";
435             action: STATE_SET "default" 0.0;
436             transition: DECELERATE 0.3;
437             target: "elm.swallow.index.1";
438             target: "clip2";
439             target: "index.1.bg.image.middle";
440          }
441          program { name: "index1.active";
442             signal: "elm,state,level,1";
443             source: "elm";
444             action: STATE_SET "active" 0.0;
445             transition: DECELERATE 0.3;
446             target: "elm.swallow.index.1";
447             target: "clip2";
448             target: "index.1.bg.image.middle";
449          }
450          program { name: "button.image.hidden";
451             signal: "elm,state,button,image,hide";
452             source: "elm";
453             action: STATE_SET "invisible" 0.0;
454             target: "button_image";
455          }
456          program { name: "disable_timer";
457             script {
458                set_int(timer_flag, 0);
459             }
460          }
461          program { name: "enable_timer";
462             script {
463                set_int(timer_flag, 1);
464             }
465          }
466       }
467    }
468
469    group { name: "elm/index/item/vertical/default";
470       alias: "elm/index/item_odd/vertical/default";
471       data.item: "stacking" "above";
472       data.item: "selectraise" "on";
473       parts {
474          part { name: "elm.text";
475             type: TEXT;
476             mouse_events: 0;
477             scale: 1;
478             description {
479                min: INDEX_ITEM_WIDTH_INC INDEX_ITEM_HEIGHT_INC;
480                align: 0.5 0.5;
481                state: "default" 0.0;
482                rel1 {
483                   relative: 0.0  0.0;
484                }
485                rel2 {
486                   relative: 1.0  1.0;
487                }
488                color: INDEX_ROLLOVER_TEXT_COLOR_INC;
489                text {
490                   font: "SLP:style=Medium";
491                   size: INDEX_ROLLOVER_TEXT_SIZE_INC;
492                   min: 1 1;
493                   align: 0.5 0.5;
494                }
495             }
496             description { state: "active" 0.0;
497                inherit: "default" 0.0;
498                color: INDEX_ROLLOVER_ACTIVE_TEXT_COLOR_INC;
499             }
500          }
501       }
502       programs {
503          program { name: "active";
504             signal: "elm,state,active";
505             source: "elm";
506             action: STATE_SET "active" 0.0;
507             transition: DECELERATE 1.0;
508             target: "elm.text";
509          }
510          program { name: "inactive";
511             signal: "elm,state,inactive";
512             source: "elm";
513             action: STATE_SET "default" 0.0;
514             transition: DECELERATE 0.1;
515             target: "elm.text";
516          }
517       }
518    }
519    group {
520       name: "elm/index/base/vertical/pagecontrol";
521       alias: "elm/index/base/horizontal/pagecontrol";
522       parts {
523          part { name: "clip";
524             type: RECT;
525             mouse_events:  0;
526             description { state: "default" 0.0;
527                visible:  0;
528                color: 255 255 255 0;
529             }
530             description { state: "active" 0.0;
531                visible:  1;
532                color: 255 255 255 255;
533             }
534          }
535          part { name: "elm.swallow.index.0";
536             type: SWALLOW;
537             scale: 1;
538             clip_to: "clip";
539             description {
540                state: "default" 0.0;
541                align: 0.5 0.5;
542                rel1.relative: 0 0;
543                rel2.relative: 1 1;
544             }
545          }
546          part { name: "elm.swallow.event.0";
547             type: SWALLOW;
548             description { state: "default" 0.0;
549                align: 0.5 0.5;
550             }
551          }
552       }
553       programs {
554          program { name: "active";
555             signal: "elm,state,active";
556             source: "elm";
557             action: STATE_SET "active" 0.0;
558             transition: DECELERATE 0.5;
559             target: "clip";
560          }
561          program { name: "inactive";
562             signal: "elm,state,inactive";
563             source: "elm";
564             action: STATE_SET "default" 0.0;
565             transition: DECELERATE 0.5;
566             target: "clip";
567          }
568       }
569    }
570    group {
571       name: "elm/index/item/vertical/pagecontrol";
572       alias: "elm/index/item_odd/vertical/pagecontrol";
573       alias: "elm/index/item/horizontal/pagecontrol";
574       alias: "elm/index/item_odd/horizontal/pagecontrol";
575       images {
576          image: "00_mainmenu_page_bar_001.png" COMP;
577          image: "00_mainmenu_page_bar_002.png" COMP;
578       }
579       parts {
580          part { name:"bg";
581             type : RECT;
582             scale: 1;
583             description { state: "default" 0.0;
584                min: INDEX_PAGECONTROL_IND_INC;
585                max: INDEX_PAGECONTROL_IND_INC;
586                visible: 0;
587                align: 0.5 0.5;
588             }
589          }
590          part { name: "indicator1";
591             type: IMAGE;
592             mouse_events: 0;
593             scale: 1;
594             description { state: "default" 0.0;
595                align: 0.5 0.5;
596                fixed: 1 1;
597                rel1.to: "bg";
598                rel2.to: "bg";
599                image {
600                   normal: "00_mainmenu_page_bar_001.png";
601                }
602             }
603             description { state: "active" 0.0;
604                inherit: "default" 0.0;
605                visible: 0;
606             }
607          }
608          part { name: "indicator2";
609             type: IMAGE;
610             mouse_events: 0;
611             scale: 1;
612             description { state: "default" 0.0;
613                align: 0.5 0.5;
614                fixed: 1 1;
615                min: INDEX_PAGECONTROL_IND_MIN_INC;
616                max: INDEX_PAGECONTROL_IND_MIN_INC;
617                image.normal: "00_mainmenu_page_bar_002.png";
618                visible: 0;
619             }
620             description { state: "active" 0.0;
621                inherit: "default" 0.0;
622                min: INDEX_PAGECONTROL_IND_INC;
623                max: INDEX_PAGECONTROL_IND_INC;
624                visible: 1;
625             }
626          }
627          part { name: "elm.text";
628             type: TEXT;
629             mouse_events: 0;
630             scale: 1;
631             description { state: "default" 0.0;
632                fixed: 1 1;
633                color: INDEX_PAGECONTROL_FONT_COLOR_INC 0;
634                align: 0.5 0.5;
635                text {
636                   font: "SLP:style=Medium";
637                   size: INDEX_PAGECONTROL_FONT_SIZE_INC;
638                   min: 0 1;
639                   align: 0.5 0.5;
640                }
641                rel1 { to: "indicator2"; }
642                rel2 { to: "indicator2"; }
643             }
644             description { state: "active" 0.0;
645                inherit: "default" 0.0;
646                color: INDEX_PAGECONTROL_FONT_COLOR_INC 255;
647             }
648          }
649       }
650       programs {
651          program { name: "active";
652             signal: "elm,state,active";
653             source: "elm";
654             action: STATE_SET "active" 0.0;
655             target: "indicator1";
656             target: "indicator2";
657             target: "elm.text";
658             transition: LINEAR 0.2;
659          }
660          program { name: "inactive";
661             signal: "elm,state,inactive";
662             source: "elm";
663             action: STATE_SET "default" 0.0;
664             target: "indicator1";
665             target: "indicator2";
666             target: "elm.text";
667             transition: LINEAR 0.2;
668          }
669       }
670    }