[Toolbar] Fix the toolbar item checks the selected state when the text is set.
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / toolbar.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 #define ITEM_STATE_ENABLED 0
21 #define ITEM_STATE_DISABLED 1
22
23 #define TOOLBAR_TEXT_STYLE(_font_size) \
24    style { name: "toolbar_text_style_"_font_size; \
25       base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \
26       tag: "br" "\n"; \
27       tag: "ps" "ps"; \
28       tag: "hilight" "+ font=Tizen:style=Bold"; \
29       tag: "b" "+ font=Tizen:style=Bold"; \
30       tag: "tab" "\t"; \
31    }
32
33 #define TOOLBAR_SELECTED_TEXT_STYLE(_font_size) \
34    style { name: "toolbar_selected_text_style_"_font_size; \
35       base: "font=Tizen:style=Medium style=far_shadow,bottom shadow_color=#ffffffff font_size="_font_size" align=center color="TABBAR_ITEM_SELECTED_TEXTBLOCK_COLOR_INC" wrap=word ellipsis=1 text_class=tizen linegap=-10"; \
36       tag: "br" "\n"; \
37       tag: "ps" "ps"; \
38       tag: "hilight" "+ font=Tizen:style=Bold"; \
39       tag: "b" "+ font=Tizen:style=Bold"; \
40       tag: "tab" "\t"; \
41    }
42
43 styles{
44    TOOLBAR_TEXT_STYLE(24)
45    TOOLBAR_TEXT_STYLE(28)
46    TOOLBAR_TEXT_STYLE(30)
47    TOOLBAR_SELECTED_TEXT_STYLE(24)
48    TOOLBAR_SELECTED_TEXT_STYLE(28)
49    TOOLBAR_SELECTED_TEXT_STYLE(30)
50 }
51
52 group { name: "elm/toolbar/base/default";
53    images {
54       image: "00_winset_control_toolbar_bg.png" COMP;
55    }
56    parts {
57       part { name: "base";
58          mouse_events: 1;
59          description { state: "default" 0.0;
60             image.normal: "00_winset_control_toolbar_bg.png";
61          }
62       }
63       part { name: "clipper";
64          type: RECT;
65          mouse_events: 0;
66          description {
67             state: "default" 0.0;
68             rel1 {
69                to: "base";
70                offset: 2 2;
71             }
72             rel2 {
73                to: "base";
74                offset: -3 -3;
75             }
76          }
77       }
78       part { name: "elm.swallow.content";
79          clip_to: "clipper";
80          type: SWALLOW;
81          description {
82             state: "default" 0.0;
83             rel1.to: "clipper";
84             rel2.to: "clipper";
85          }
86       }
87       part { name: "event";
88          type: RECT;
89          mouse_events: 1;
90          repeat_events: 1;
91          description { state: "default" 0.0;
92             color: 0 0 0 0;
93          }
94       }
95    }
96 }
97
98 group { name: "elm/toolbar/item/default";
99    images {
100       image: "00_winset_toolbar_press.png" COMP;
101    }
102
103    data.item: "transition_animation_on" "1";
104    script {
105       public item_state = ITEM_STATE_ENABLED;
106       public items_number = 0;
107    }
108    parts {
109       part { name: "bg";
110          mouse_events: 0;
111          description { state: "default" 0.0;
112             visible: 0;
113             color: 255 255 255 0;
114             rel1 {
115                relative: 0.0 0.0;
116                offset: TOOLBAR_ITEM_BG_REL1_OFFSET_INC;
117             }
118             rel2 {
119                relative: 1.0 1.0;
120                offset: TOOLBAR_ITEM_BG_REL2_OFFSET_INC;
121             }
122             image {
123                normal: "00_winset_toolbar_press.png";
124                border: TOOLBAR_ITEM_BG_SELECTED_BORDER_INC;
125             }
126             image.middle: SOLID;
127             fill.smooth: 0;
128          }
129          description { state: "selected" 0.0;
130             inherit: "default" 0.0;
131             visible: 1;
132             color: 255 255 255 255;
133          }
134          description { state: "disabled" 0.0;
135             inherit: "default" 0.0;
136             visible: 0;
137             color: 255 255 255 0;
138          }
139       }
140       part { name: "padding_left_top";
141          type: RECT;
142          scale: 1;
143          mouse_events: 0;
144          description { state: "default" 0.0;
145             align: 0.0 0.0;
146             rel2.relative: 0.0 0.0;
147             min: 10 8;
148             fixed: 1 1;
149             visible: 1;
150             color: 0 0 0 0;
151          }
152       }
153       part { name: "padding_right_bottom";
154          type: RECT;
155          scale: 1;
156          mouse_events: 0;
157          description { state: "default" 0.0;
158             align: 1.0 1.0;
159             rel1.relative: 1.0 1.0;
160             min: 10 5;
161             fixed: 1 1;
162             visible: 1;
163             color: 0 0 0 0;
164          }
165       }
166       part {
167          name: "icon_rect";
168          type: RECT;
169          scale: 1;
170          mouse_events: 0;
171          description { state: "default" 0.0;
172             min: 0 0;
173             fixed: 0 1;
174             rel1 {
175                relative: 1.0 1.0;
176                to: "padding_left_top";
177             }
178             rel2 {
179                relative: 0.0 1.0;
180                to_x: "padding_right_bottom";
181                to_y: "padding_left_top";
182             }
183             align: 0.5 0.0;
184             color: 0 0 0 0;
185          }
186          description { state: "visible" 0.0;
187             min: TABBAR_ITEM_ICON_SIZE_INC;
188             fixed: 0 1;
189             rel1 {
190                relative: 1.0 1.0;
191                to: "padding_left_top";
192             }
193             rel2 {
194                relative: 0.0 1.0;
195                to_x: "padding_right_bottom";
196                to_y: "padding_left_top";
197             }
198             align: 0.5 0.0;
199             color: 0 0 0 0;
200          }
201          description { state: "icononly" 0.0;
202             inherit: "default" 0.0;
203          }
204       }
205       part { name: "padding_after_icon";
206          type: RECT;
207          scale: 1;
208          mouse_events: 0;
209          description { state: "default" 0.0; //when only icon or no icon is there
210             align: 0.0 0.0;
211             rel1 {
212                relative: 0.0 1.0;
213                to: "icon_rect";
214             }
215             rel2.to: "icon_rect";
216             fixed: 0 1;
217             min: 0 0;
218             color: 0 0 0 0;
219          }
220          description { state: "visible" 0.0;
221             inherit: "default" 0.0;
222          }
223          description { state: "icononly" 0.0;
224             inherit: "default" 0.0;
225          }
226       }
227       part { name: "padding_before_text";
228          type: RECT;
229          scale: 1;
230          mouse_events: 0;
231          description { state: "default" 0.0; //when only icon or no icon is there
232             align: 0.5 1.0;
233             rel1 {
234                relative: 1.0 0.0;
235                to_x: "padding_left_top";
236                to_y: "elm.text";
237             }
238             rel2 {
239                relative: 0.0 0.0;
240                to_x: "padding_right_bottom";
241                to_y: "elm.text";
242             }
243             fixed: 0 1;
244             min: 0 0;
245             color: 0 0 0 0;
246          }
247       }
248       part { name: "elm.swallow.icon";
249          type: SWALLOW;
250          scale: 1;
251          clip_to: "elm.icon.clipper";
252          description { state: "default" 0.0;
253             visible: 0;
254             align: 0.5 0.0;
255             rel1 {
256                relative: 1.0 1.0;
257                to: "padding_left_top";
258             }
259             rel2 {
260                relative: 0.0 1.0;
261                to_x: "padding_right_bottom";
262                to_y: "padding_left_top";
263             }
264             fixed: 0 1;
265          }
266          description { state: "visible" 0.0;
267             fixed: 0 1;
268             min: TABBAR_ITEM_ICON_SIZE_INC;
269             max: TABBAR_ITEM_ICON_SIZE_INC;
270             rel1 {
271                relative: 1.0 1.0;
272                to: "padding_left_top";
273             }
274             rel2 {
275                relative: 0.0 0.0;
276                to_x: "padding_right_bottom";
277                to_y: "padding_before_text";
278             }
279             aspect: 1.0 1.0;
280             aspect_preference: HORIZONTAL;
281          }
282          description { state: "icononly" 0.0;
283             min: TABBAR_ITEM_ICON_SIZE_INC;
284             max: TABBAR_ITEM_ICON_SIZE_INC;
285             rel1 {
286                relative: 1.0 1.0;
287                to: "padding_left_top";
288             }
289             rel2 {
290                relative: 0.0 0.0;
291                to: "padding_right_bottom";
292             }
293             aspect: 1.0 1.0;
294             aspect_preference: HORIZONTAL;
295          }
296       }
297       part { name: "elm.swallow.icon_new";
298          type: SWALLOW;
299          scale: 1;
300          clip_to: "elm.icon_new.clipper";
301          description { state: "default" 0.0;
302             visible: 0;
303             align: 0.5 0.0;
304             rel1 {
305                relative: 1.0 1.0;
306                to: "padding_left_top";
307             }
308             rel2 {
309                relative: 0.0 1.0;
310                to_x: "padding_right_bottom";
311                to_y: "padding_left_top";
312             }
313             fixed: 0 1;
314          }
315          description { state: "visible" 0.0;
316             fixed: 0 1;
317             min: TABBAR_ITEM_ICON_SIZE_INC;
318             max: TABBAR_ITEM_ICON_SIZE_INC;
319             rel1 {
320                relative: 1.0 1.0;
321                to: "padding_left_top";
322             }
323             rel2 {
324                relative: 0.0 0.0;
325                to_x: "padding_right_bottom";
326                to_y: "padding_before_text";
327             }
328             aspect: 1.0 1.0;
329             aspect_preference: HORIZONTAL;
330          }
331          description { state: "icononly" 0.0;
332             min: TABBAR_ITEM_ICON_SIZE_INC;
333             max: TABBAR_ITEM_ICON_SIZE_INC;
334             rel1 {
335                relative: 1.0 1.0;
336                to: "padding_left_top";
337             }
338             rel2 {
339                relative: 0.0 0.0;
340                to: "padding_right_bottom";
341             }
342             aspect: 1.0 1.0;
343             aspect_preference: HORIZONTAL;
344          }
345       }
346       part { name: "elm.text";
347          type: TEXTBLOCK;
348          mouse_events: 0;
349          scale: 1;
350          clip_to: "elm.text.clipper";
351          description { state: "default" 0.0;
352             visible: 0;
353             rel1 {
354                relative: 1.0 1.0;
355                to_x: "padding_left_top";
356                to_y: "padding_after_icon";
357             }
358             rel2 {
359                relative: 0.0 0.0;
360                to: "padding_right_bottom";
361             }
362             color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
363             fixed: 1 1;
364             text {
365                style: "toolbar_text_style_26";
366                min: 0 1;
367             }
368          }
369          description { state: "visible" 0.0;
370             inherit: "default" 0.0;
371             visible: 1;
372          }
373          description { state: "visible_30" 0.0;
374             inherit: "default" 0.0;
375             text.style: "toolbar_text_style_30";
376             visible: 1;
377          }
378          description { state: "visible_32" 0.0;
379             inherit: "default" 0.0;
380             text.style: "toolbar_text_style_32";
381             visible: 1;
382          }
383          description { state: "visible_36" 0.0;
384             inherit: "default" 0.0;
385             text.style: "toolbar_text_style_36";
386             visible: 1;
387          }
388       }
389       part { name: "elm.text_new";
390          type: TEXTBLOCK;
391          mouse_events: 0;
392          scale: 1;
393          clip_to: "elm.text_new.clipper";
394          description { state: "default" 0.0;
395             visible: 0;
396             rel1 {
397                relative: 1.0 1.0;
398                to_x: "padding_left_top";
399                to_y: "padding_after_icon";
400             }
401             rel2 {
402                relative: 0.0 0.0;
403                to: "padding_right_bottom";
404             }
405             color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
406             fixed: 1 1;
407             text {
408                style: "toolbar_text_style_26";
409                min: 0 1;
410             }
411          }
412          description { state: "visible" 0.0;
413             inherit: "default" 0.0;
414             visible: 1;
415          }
416          description { state: "visible_30" 0.0;
417             inherit: "default" 0.0;
418             text.style: "toolbar_text_style_30";
419             visible: 1;
420          }
421          description { state: "visible_32" 0.0;
422             inherit: "default" 0.0;
423             text.style: "toolbar_text_style_32";
424             visible: 1;
425          }
426          description { state: "visible_36" 0.0;
427             inherit: "default" 0.0;
428             text.style: "toolbar_text_style_36";
429             visible: 1;
430          }
431       }
432       part { name: "elm.text.clipper";
433          type: RECT;
434          description { state: "default" 0.0;
435             color: 255 255 255 255;
436          }
437          description { state: "animation" 0.0;
438             color: 255 255 255 0;
439          }
440          description { state: "disabled" 0.0;
441             color: 255 255 255 153;
442          }
443       }
444       part { name: "elm.text_new.clipper";
445          type: RECT;
446          description { state: "default" 0.0;
447             color: 255 255 255 0;
448          }
449          description { state: "animation" 0.0;
450             color: 255 255 255 255;
451          }
452          description { state: "disabled" 0.0;
453             color: 255 255 255 153;
454          }
455       }
456       part { name: "elm.icon.clipper";
457          type: RECT;
458          description { state: "default" 0.0;
459             color: 255 255 255 255;
460          }
461          description { state: "animation" 0.0;
462             color: 255 255 255 0;
463          }
464          description { state: "disabled" 0.0;
465             color: 255 255 255 153;
466          }
467       }
468       part { name: "elm.icon_new.clipper";
469          type: RECT;
470          description { state: "default" 0.0;
471             color: 255 255 255 0;
472          }
473          description { state: "animation" 0.0;
474             color: 255 255 255 255;
475          }
476          description { state: "disabled" 0.0;
477             color: 255 255 255 153;
478          }
479       }
480       part { name: "event";
481          type: RECT;
482          mouse_events: 1;
483          ignore_flags: ON_HOLD;
484          description { state: "default" 0.0;
485             color: 0 0 0 0;
486          }
487       }
488       part { name: "event2";
489          type: RECT;
490          mouse_events: 1;
491          repeat_events: 1;
492          description { state: "default" 0.0;
493             color: 0 0 0 0;
494          }
495       }
496    }
497    programs {
498       program { name: "pressed";
499          signal:  "mouse,down,1";
500          source:  "event";
501          script {
502             if (get_int(item_state) != ITEM_STATE_DISABLED)
503               set_state(PART:"bg", "selected", 0.0);
504          }
505          transition: LINEAR 0.2;
506       }
507       program { name: "unpressed";
508          signal:  "mouse,up,1";
509          source:  "event2";
510          action:  STATE_SET "default" 0.0;
511          target:  "bg";
512          transition: LINEAR 0.1;
513       }
514       program { name: "go";
515          signal:  "mouse,clicked,1";
516          source:  "event";
517          action:  SIGNAL_EMIT "elm,action,click" "elm";
518       }
519       program { name: "mouse,in";
520          signal:  "mouse,in";
521          source:  "event";
522          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
523       }
524       program { name: "mouse,out";
525          signal:  "mouse,out";
526          source:  "event";
527          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
528       }
529       program { name: "disable";
530          signal: "elm,state,disabled";
531          source: "elm";
532          script {
533             set_int(item_state, ITEM_STATE_DISABLED);
534             set_state(PART:"bg", "disabled", 0.0);
535             set_state(PART:"elm.text.clipper", "disabled", 0.0);
536             set_state(PART:"elm.icon.clipper", "disabled", 0.0);
537             run_program(PROGRAM:"label_set,animation,done");
538             run_program(PROGRAM:"icon_set,animation,done");
539          }
540       }
541       program { name: "enable";
542          signal: "elm,state,enabled";
543          source: "elm";
544          script {
545             set_int(item_state, ITEM_STATE_ENABLED);
546             set_state(PART:"bg", "default", 0.0);
547             set_state(PART:"elm.text.clipper", "default", 0.0);
548             set_state(PART:"elm.icon.clipper", "default", 0.0);
549             run_program(PROGRAM:"label_set,animation,done");
550             run_program(PROGRAM:"icon_set,animation,done");
551          }
552       }
553       program { name: "label_set,animation,forward";
554          signal: "elm,state,label_set,forward";
555          source: "elm";
556          after: "label_set,sync";
557       }
558       program { name: "label_set,animation,backward";
559          signal: "elm,state,label_set,backward";
560          source: "elm";
561          after: "label_set,sync";
562       }
563       program { name: "label_set,sync";
564          signal: "elm,state,label_set";
565          source: "elm";
566          script {
567             new st[31];
568             new Float:vl;
569             get_state(PART:"elm.text", st, 30, vl);
570             set_state(PART:"elm.text_new", st, vl);
571          }
572          after: "label_set,animation";
573       }
574       program { name: "label_set,animation";
575          action: STATE_SET "animation" 0.0;
576          target: "elm.text.clipper";
577          target: "elm.text_new.clipper";
578          transition: LINEAR 0.2;
579          after: "label_set,animation,done";
580       }
581       program { name: "label_set,animation,done";
582          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
583       }
584       program { name: "label,reset";
585          signal: "elm,state,label,reset";
586          source: "elm";
587          script {
588             set_state(PART:"elm.text_new.clipper", "default", 0.0);
589             if (get_int(item_state) != ITEM_STATE_DISABLED)
590               set_state(PART:"elm.text.clipper", "default", 0.0);
591             else
592               set_state(PART:"elm.text.clipper", "disabled", 0.0);
593          }
594       }
595       program { name: "icon_set,animation,forward";
596          signal: "elm,state,icon_set,forward";
597          source: "elm";
598          after: "icon_set,animation";
599       }
600       program { name: "icon_set,animation,backward";
601          signal: "elm,state,icon_set,backward";
602          source: "elm";
603          after: "icon_set,animation";
604       }
605       program { name: "icon_set,animation";
606          signal: "elm,state,icon_set";
607          source: "elm";
608          action: STATE_SET "animation" 0.0;
609          target: "elm.icon.clipper";
610          target: "elm.icon_new.clipper";
611          transition: LINEAR 0.2;
612          after: "icon_set,animation,done";
613       }
614       program { name: "icon_set,animation,done";
615          action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
616       }
617       program { name: "icon,reset";
618          signal: "elm,state,icon,reset";
619          source: "elm";
620          script {
621             set_state(PART:"elm.icon_new.clipper", "default", 0.0);
622             if (get_int(item_state) != ITEM_STATE_DISABLED)
623               set_state(PART:"elm.icon.clipper", "default", 0.0);
624             else
625               set_state(PART:"elm.icon.clipper", "disabled", 0.0);
626          }
627       }
628       program { name: "text_show";
629          signal: "elm,state,text,visible";
630          source: "elm";
631          script {
632             new st[31];
633             new Float:vl;
634             get_state(PART:"elm.swallow.icon", st, 30, vl);
635             if (!strcmp(st, "icononly"))
636               {
637                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
638                  set_state(PART:"icon_rect", "visible", 0.0);
639                  set_state(PART:"padding_after_icon", "visible", 0.0);
640               }
641             if (strcmp(st, "default"))
642               {
643                  set_state(PART:"elm.text", "visible", 0.0);
644               }
645             else
646               {
647                 if (get_int(items_number) <= 3)
648                   set_state(PART:"elm.text", "visible_32", 0.0);
649                 else if (get_int(items_number) >= 4)
650                   set_state(PART:"elm.text", "visible_30", 0.0);
651               }
652          }
653       }
654       program { name: "text_hide";
655          signal: "elm,state,text,hidden";
656          source: "elm";
657          script {
658             new st[31];
659             new Float:vl;
660             get_state(PART:"elm.swallow.icon", st, 30, vl);
661             if (!strcmp(st, "visible"))
662               {
663                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
664                  set_state(PART:"icon_rect", "icononly", 0.0);
665                  set_state(PART:"padding_after_icon", "icononly", 0.0);
666               }
667             set_state(PART:"elm.text", "default", 0.0);
668          }
669       }
670       program { name: "icon_show";
671          signal: "elm,state,icon,visible";
672          source: "elm";
673          script {
674             new st[31];
675             new Float:vl;
676             get_state(PART:"elm.text", st, 30, vl);
677             if (!strncmp(st, "visible", 7))
678               {
679                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
680                  set_state(PART:"icon_rect", "visible", 0.0);
681                  set_state(PART:"padding_after_icon", "visible", 0.0);
682                  set_state(PART:"elm.text", "visible", 0.0);
683               }
684             else
685               {
686                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
687                  set_state(PART:"icon_rect", "icononly", 0.0);
688                  set_state(PART:"padding_after_icon", "icononly", 0.0);
689               }
690          }
691       }
692       program { name: "icon_hide";
693          signal: "elm,state,icon,hidden";
694          source: "elm";
695          script {
696             new st[31];
697             new Float:vl;
698             get_state(PART:"elm.text", st, 30, vl);
699             if (!strncmp(st, "visible", 7))
700               {
701                 if (get_int(items_number) <= 3)
702                   set_state(PART:"elm.text", "visible_32", 0.0);
703                 else if (get_int(items_number) >= 4)
704                   set_state(PART:"elm.text", "visible_30", 0.0);
705               }
706             set_state(PART:"elm.swallow.icon", "default", 0.0);
707             set_state(PART:"icon_rect", "default", 0.0);
708             set_state(PART:"padding_after_icon", "default", 0.0);
709          }
710       }
711       program { name: "text_only_item_1";
712          signal: "elm,number,item,1";
713          source: "elm";
714          script {
715             set_int(items_number, 1);
716          }
717          after: "text_only_item_under_3";
718       }
719       program { name: "text_only_item_2";
720          signal: "elm,number,item,2";
721          source: "elm";
722          script {
723             set_int(items_number, 2);
724          }
725          after: "text_only_item_under_3";
726       }
727       program { name: "text_only_item_3";
728          signal: "elm,number,item,3";
729          source: "elm";
730          script {
731             set_int(items_number, 3);
732          }
733          after: "text_only_item_under_3";
734       }
735       program { name: "text_only_item_under_3";
736          script {
737             new st[31];
738             new Float:vl;
739             get_state(PART:"elm.swallow.icon", st, 30, vl);
740             if (strcmp(st, "visible"))
741               {
742                 get_state(PART:"elm.text", st, 30, vl);
743                 if (!strncmp(st, "visible", 7))
744                   {
745                       set_state(PART:"elm.text", "visible_32", 0.0);
746                   }
747               }
748          }
749       }
750       program { name: "text_only_item_4";
751          signal: "elm,number,item,4";
752          source: "elm";
753          script {
754             set_int(items_number, 4);
755          }
756          after: "text_only_item_upper_4";
757       }
758       program { name: "text_only_item_5";
759          signal: "elm,number,item,5";
760          source: "elm";
761          script {
762             set_int(items_number, 5);
763          }
764          after: "text_only_item_upper_4";
765       }
766       program { name: "text_only_item_6";
767          signal: "elm,number,item,6";
768          source: "elm";
769          script {
770             set_int(items_number, 6);
771          }
772          after: "text_only_item_upper_4";
773       }
774       program { name: "text_only_item_7";
775          signal: "elm,number,item,7";
776          source: "elm";
777          script {
778             set_int(items_number, 7);
779          }
780          after: "text_only_item_upper_4";
781       }
782       program { name: "text_only_item_8";
783          signal: "elm,number,item,8";
784          source: "elm";
785          script {
786             set_int(items_number, 8);
787          }
788          after: "text_only_item_upper_4";
789       }
790       program { name: "text_only_item_9";
791          signal: "elm,number,item,9";
792          source: "elm";
793          script {
794             set_int(items_number, 9);
795          }
796          after: "text_only_item_upper_4";
797       }
798       program { name: "text_only_item_10";
799          signal: "elm,number,item,10";
800          source: "elm";
801          script {
802             set_int(items_number, 10);
803          }
804          after: "text_only_item_upper_4";
805       }
806       program { name: "text_only_item_upper_4";
807          signal: "elm,number,item,4";
808          source: "elm";
809          script {
810             new st[31];
811             new Float:vl;
812             get_state(PART:"elm.swallow.icon", st, 30, vl);
813             if (strcmp(st, "visible"))
814               {
815                 get_state(PART:"elm.text", st, 30, vl);
816                 if (!strncmp(st, "visible", 7))
817                   {
818                       set_state(PART:"elm.text", "visible_30", 0.0);
819                   }
820               }
821          }
822       }
823    }
824 }
825
826 group { name: "elm/toolbar/item/item_horizontal";
827    inherit: "elm/toolbar/item/default";
828    parts {
829       part { name: "icon_rect";
830          description { state: "default" 0.0;
831             fixed: 1 0;
832             align: 0.0 0.5;
833          }
834          description { state: "visible" 0.0;
835             fixed: 1 0;
836             rel2 {
837                relative: 1.0 0.0;
838                to_x: "padding_left_top";
839                to_y: "padding_right_bottom";
840             }
841             align: 0.0 0.5;
842          }
843       }
844       part { name: "padding_after_icon";
845          description { state: "default" 0.0; //when only icon or no icon is there
846             rel1.relative: 1.0 0.0;
847             fixed: 1 1;
848          }
849          description { state: "visible" 0.0;
850             inherit: "default" 0.0;
851             min: 6 0;
852          }
853       }
854       part { name: "padding_before_text";
855          description { state: "default" 0.0; //when only icon or no icon is there
856             align: 1.0 0.5;
857             rel1 {
858                relative: 0.0 1.0;
859                to_x: "elm.text";
860                to_y: "padding_left_top";
861             }
862             rel2 {
863                to_x: "elm.text";
864                to_y: "padding_right_bottom";
865             }
866             fixed: 1 0;
867             min: 6 0;
868          }
869       }
870       part { name: "elm.swallow.icon";
871          description { state: "default" 0.0;
872             align: 0.0 0.5;
873             rel2 {
874                relative: 1.0 0.0;
875                to_x: "padding_left_top";
876                to_y: "padding_right_bottom";
877             }
878             fixed: 1 0;
879          }
880          description { state: "visible" 0.0;
881             fixed: 1 0;
882             align: 1.0 0.5;
883             rel1 {
884                relative: 0.0 1.0;
885                to_x: "padding_before_text";
886                to_y: "padding_left_top";
887             }
888             rel2 {
889                relative: 0.0 0.0;
890                to_x: "padding_before_text";
891                to_y: "padding_right_bottom";
892             }
893             aspect_preference: VERTICAL;
894          }
895          description { state: "icononly" 0.0;
896             aspect_preference: VERTICAL;
897          }
898       }
899       part { name: "elm.swallow.icon_new";
900          description { state: "default" 0.0;
901             align: 0.0 0.5;
902             rel2 {
903                relative: 1.0 0.0;
904                to_x: "padding_left_top";
905                to_y: "padding_right_bottom";
906             }
907             fixed: 1 0;
908          }
909          description { state: "visible" 0.0;
910             fixed: 1 0;
911             align: 1.0 0.5;
912             rel1 {
913                relative: 0.0 1.0;
914                to_x: "padding_before_text";
915                to_y: "padding_left_top";
916             }
917             rel2 {
918                relative: 0.0 0.0;
919                to_x: "padding_before_text";
920                to_y: "padding_right_bottom";
921             }
922             aspect_preference: VERTICAL;
923          }
924          description { state: "icononly" 0.0;
925             aspect_preference: VERTICAL;
926          }
927       }
928       part { name: "elm.text";
929          type: TEXTBLOCK;
930          description { state: "default" 0.0;
931             rel1 {
932                relative: 1.0 1.0;
933                to_x: "padding_after_icon";
934                to_y: "padding_left_top";
935             }
936             text {
937                min: 1 0;
938             }
939          }
940          description { state: "visible" 0.0;
941             inherit: "default" 0.0;
942             visible: 1;
943          }
944          description { state: "visible_30" 0.0;
945             inherit: "default" 0.0;
946             text.style: "toolbar_text_style_30";
947             visible: 1;
948          }
949          description { state: "visible_32" 0.0;
950             inherit: "default" 0.0;
951             text.style: "toolbar_text_style_32";
952             visible: 1;
953          }
954          description { state: "visible_36" 0.0;
955             inherit: "default" 0.0;
956             text.style: "toolbar_text_style_36";
957             visible: 1;
958          }
959       }
960       part { name: "elm.text_new";
961          type: TEXTBLOCK;
962          description { state: "default" 0.0;
963             rel1 {
964                relative: 1.0 1.0;
965                to_x: "padding_after_icon";
966                to_y: "padding_left_top";
967             }
968             text {
969                min: 1 0;
970             }
971          }
972          description { state: "visible" 0.0;
973             inherit: "default" 0.0;
974             visible: 1;
975          }
976          description { state: "visible_30" 0.0;
977             inherit: "default" 0.0;
978             text.style: "toolbar_text_style_30";
979             visible: 1;
980          }
981          description { state: "visible_32" 0.0;
982             inherit: "default" 0.0;
983             text.style: "toolbar_text_style_32";
984             visible: 1;
985          }
986          description { state: "visible_36" 0.0;
987             inherit: "default" 0.0;
988             text.style: "toolbar_text_style_36";
989             visible: 1;
990          }
991       }
992    }
993 }
994
995 group { name: "elm/toolbar/separator/default";
996    images {
997       image: "00_winset_divider_line.png" COMP;
998    }
999    parts {
1000       part { name: "base";
1001          type: IMAGE;
1002          scale: 1;
1003          description { state: "default" 0.0;
1004             min: 4 48;
1005             max: 4 9999;
1006             fixed: 1 1;
1007             rel1.relative: 0.0 0.5;
1008             rel2.relative: 0.0 0.5;
1009             image {
1010                 normal: "00_winset_divider_line.png";
1011                 border: 0 0 2 2;
1012             }
1013          }
1014       }
1015    }
1016 }
1017
1018 group { name: "elm/toolbar/object/default";
1019    parts {
1020       part { name: "elm.swallow.object"; // object group
1021          type: SWALLOW;
1022          description {
1023              state: "default" 0.0;
1024          }
1025       }
1026    }
1027 }
1028
1029 group { name: "elm/toolbar/base/tabbar";
1030    images {
1031       image: "00_effect_tab_bounce_left.png" COMP;
1032       image: "00_effect_tab_bounce_right.png" COMP;
1033    }
1034    script {
1035       public left_timer, right_timer;
1036       public l_timer(val) {
1037          emit("do-hide-left-shadow", "");
1038          set_int(left_timer, 0);
1039          return 0;
1040       }
1041       public r_timer(val) {
1042          emit("do-hide-right-shadow", "");
1043          set_int(right_timer, 0);
1044          return 0;
1045       }
1046    }
1047    parts {
1048       part { name: "base";
1049          type: RECT;
1050          scale: 1;
1051          description { state: "default" 0.0;
1052             color: 248 246 239 255;
1053          }
1054       }
1055       part { name: "left_padding";
1056          type: RECT;
1057          mouse_events: 0;
1058          scale: 1;
1059          description {
1060             state: "default" 0.0;
1061             min: 16 0;
1062             fixed: 1 1;
1063             visible: 0;
1064             align: 0.0 0.5;
1065             rel1.to: "base";
1066             rel2.to: "base";
1067             rel1.relative: 0.0 0.0;
1068             rel2.relative: 0.0 1.0;
1069          }
1070       }
1071       part { name: "right_padding";
1072          type: RECT;
1073          mouse_events: 0;
1074          scale: 1;
1075          description {
1076             state: "default" 0.0;
1077             min: 16 0;
1078             fixed: 1 1;
1079             visible: 0;
1080             align: 1.0 0.5;
1081             rel1.to: "base";
1082             rel2.to: "base";
1083             rel1.relative: 1.0 0.0;
1084             rel2.relative: 1.0 1.0;
1085          }
1086       }
1087       part { name: "clipper";
1088          type: RECT;
1089          mouse_events: 0;
1090          scale: 1;
1091          description {
1092             state: "default" 0.0;
1093             rel1.to: "left_padding";
1094             rel1.relative: 1.0 0.0;
1095             rel2.to: "right_padding";
1096             rel2.relative: 0.0 1.0;
1097          }
1098       }
1099       part { name: "elm.swallow.content";
1100          clip_to: "clipper";
1101          type: SWALLOW;
1102          scale: 1;
1103          description {
1104             state: "default" 0.0;
1105             rel1.to: "clipper";
1106             rel2.to: "clipper";
1107          }
1108       }
1109       part { name: "left_shadow_clip";
1110          type: RECT;
1111          mouse_events: 0;
1112          scale: 1;
1113          description { state: "default" 0.0;
1114             visible: 0;
1115             color: 255 255 255 0;
1116          }
1117          description { state: "show" 0.0;
1118          }
1119       }
1120       part { name: "right_shadow_clip";
1121          type: RECT;
1122          mouse_events: 0;
1123          scale: 1;
1124          description { state: "default" 0.0;
1125             visible: 0;
1126             color: 255 255 255 0;
1127          }
1128          description { state: "show" 0.0;
1129          }
1130       }
1131       part { name: "shadow_left";
1132          clip_to: "left_shadow_clip";
1133          type: IMAGE;
1134          scale: 1;
1135          repeat_events: 1;
1136          description { state: "default" 0.0;
1137             min: 162 0;
1138             fixed: 1 1;
1139             align: 0.0 0.5;
1140             color: 255 255 255 255;
1141             rel1.relative: 0.0 0.0;
1142             rel2.relative: 0.0 1.0;
1143             image.normal: "00_effect_tab_bounce_left.png";
1144          }
1145       }
1146       part { name: "shadow_right";
1147          clip_to: "right_shadow_clip";
1148          type: IMAGE;
1149          scale: 1;
1150          repeat_events: 1;
1151          description { state: "default" 0.0;
1152             min: 162 0;
1153             fixed: 1 1;
1154             align: 1.0 0.5;
1155             color: 255 255 255 255;
1156             rel1.relative: 1.0 0.0;
1157             rel2.relative: 1.0 1.0;
1158             image.normal: "00_effect_tab_bounce_right.png";
1159          }
1160       }
1161    }
1162    programs {
1163       program { name: "load";
1164          script {
1165             set_int(left_timer, 0);
1166             set_int(right_timer, 0);
1167          }
1168       }
1169       program { name: "left_shadow_show";
1170          signal: "do-show-left-shadow";
1171          source: "";
1172          action:  STATE_SET "show" 0.0;
1173          transition: LINEAR 0.3;
1174          target: "left_shadow_clip";
1175       }
1176       program { name: "left_shadow_hide";
1177          signal: "do-hide-left-shadow";
1178          source: "";
1179          action:  STATE_SET "default" 0.0;
1180          transition: LINEAR 0.3;
1181          target: "left_shadow_clip";
1182       }
1183       program { name: "right_shadow_show";
1184          signal: "do-show-right-shadow";
1185          source: "";
1186          action:  STATE_SET "show" 0.0;
1187          transition: LINEAR 0.3;
1188          target: "right_shadow_clip";
1189       }
1190       program { name: "right_shadow_hide";
1191          signal: "do-hide-right-shadow";
1192          source: "";
1193          action:  STATE_SET "default" 0.0;
1194          transition: LINEAR 0.3;
1195          target: "right_shadow_clip";
1196       }
1197       program { name: "edge_left";
1198          signal: "elm,edge,left";
1199          source: "elm";
1200          script {
1201             new v;
1202             v = get_int(left_timer);
1203             if (!v) {
1204                 emit("do-show-left-shadow", "");
1205             }
1206             if (v > 0) cancel_timer(v);
1207             v = timer(0.5, "l_timer", 0);
1208             set_int(left_timer, v);
1209          }
1210       }
1211       program { name: "edge_right";
1212          signal: "elm,edge,right";
1213          source: "elm";
1214          script {
1215             new v;
1216             v = get_int(right_timer);
1217             if (!v) {
1218                 emit("do-show-right-shadow", "");
1219             }
1220             if (v > 0) cancel_timer(v);
1221             v = timer(0.5, "r_timer", 0);
1222             set_int(right_timer, v);
1223          }
1224       }
1225    }
1226 }
1227
1228 group { name: "elm/toolbar/more/tabbar";
1229    images {
1230       image: "00_winset_control_tab_h_line_h.png" COMP;
1231    }
1232    parts {
1233       part { name: "base";
1234          type: RECT;
1235          mouse_events: 1;
1236          description { state: "default" 0.0;
1237             rel1.relative: 0.0 0.0;
1238             rel2.relative: 1.0 0.0;
1239             color: 248 246 239 255;
1240          }
1241          description { state: "open" 0.0;
1242             inherit: "default" 0.0;
1243             rel2.relative: 1.0 1.0;
1244          }
1245          description { state: "open2" 0.0;
1246             inherit: "default" 0.0;
1247             rel2.relative: 1.0 2.0;
1248          }
1249       }
1250       part { name: "clipper";
1251          type: RECT;
1252          mouse_events: 0;
1253          description {
1254             state: "default" 0.0;
1255             fixed: 1 1;
1256             rel1 {
1257                to: "base";
1258             }
1259             rel2 {
1260                to: "base";
1261             }
1262          }
1263          description { state: "open" 0.0;
1264             inherit: "default" 0.0;
1265             rel2.relative: 1.0 1.0;
1266          }
1267          description { state: "open2" 0.0;
1268             inherit: "default" 0.0;
1269             rel2.relative: 1.0 0.5;
1270          }
1271       }
1272       part { name: "clipper2";
1273          type: RECT;
1274          mouse_events: 0;
1275          description {
1276             state: "default" 0.0;
1277             fixed: 1 1;
1278             rel1 {
1279                relative: 0.0 0.5;
1280                to: "base";
1281             }
1282             rel2 {
1283                to: "base";
1284             }
1285          }
1286          description { state: "open" 0.0;
1287             inherit: "default" 0.0;
1288             rel1.relative: 0.0 1.0;
1289          }
1290          description { state: "open2" 0.0;
1291             inherit: "default" 0.0;
1292             rel1.relative: 0.0 0.5;
1293          }
1294       }
1295       part { name: "elm.swallow.content";
1296          clip_to: "clipper";
1297          type: SWALLOW;
1298          description {
1299             state: "default" 0.0;
1300             fixed: 1 1;
1301             rel1.to: "clipper";
1302             rel2.to: "clipper";
1303          }
1304       }
1305       part { name: "elm.swallow.content2";
1306          clip_to: "clipper2";
1307          type: SWALLOW;
1308          description {
1309             state: "default" 0.0;
1310             fixed: 1 1;
1311             rel1.to: "clipper2";
1312             rel2.to: "clipper2";
1313          }
1314       }
1315       part { name: "separator";
1316          clip_to: "clipper";
1317          description { state: "default" 0.0;
1318             min: 2 3;
1319             max: 9999 3;
1320             fixed: 1 1;
1321             rel1 {
1322                 relative: 0.0 0.0;
1323                 offset: 0 0;
1324                 to: "clipper";
1325             }
1326             rel2 {
1327                 relative: 1.0 0.0;
1328                 offset: -1 3;
1329                 to: "clipper";
1330             }
1331             image {
1332                normal: "00_winset_control_tab_h_line_h.png";
1333                border: 1 1 1 1;
1334             }
1335             fill {
1336                smooth: 0;
1337             }
1338          }
1339       }
1340       part { name: "separator2";
1341          clip_to: "clipper2";
1342          description { state: "default" 0.0;
1343             min: 2 3;
1344             max: 9999 3;
1345             fixed: 1 1;
1346             rel1 {
1347                 relative: 0.0 0.0;
1348                 offset: 0 0;
1349                 to: "clipper2";
1350             }
1351             rel2 {
1352                 relative: 1.0 0.0;
1353                 offset: -1 3;
1354                 to: "clipper2";
1355             }
1356             image {
1357                normal: "00_winset_control_tab_h_line_h.png";
1358                border: 1 1 1 1;
1359             }
1360             fill {
1361                smooth: 0;
1362             }
1363          }
1364       }
1365    }
1366    programs {
1367       program { name: "open";
1368          signal:  "elm,state,open";
1369          source:  "elm";
1370          action:  STATE_SET "open" 0.0;
1371          target:  "base";
1372          target:  "clipper";
1373          target:  "clipper2";
1374          transition: LINEAR 0.2;
1375       }
1376       program { name: "open2";
1377          signal:  "elm,state,open2";
1378          source:  "elm";
1379          action:  STATE_SET "open2" 0.0;
1380          target:  "base";
1381          target:  "clipper";
1382          target:  "clipper2";
1383          transition: LINEAR 0.2;
1384       }
1385       program { name: "close";
1386          signal:  "elm,state,close";
1387          source:  "elm";
1388          action:  STATE_SET "default" 0.0;
1389          target:  "base";
1390          transition: LINEAR 0.2;
1391       }
1392    }
1393 }
1394
1395 group { name: "elm/toolbar/item/tabbar";
1396    images {
1397       image: "00_tab_press.png" COMP;
1398       image: "00_badge_bg.png" COMP;
1399       image: "00_focus.png" COMP;
1400    }
1401
1402    data.item: "transition_animation_on" "1";
1403    script {
1404       public item_state = ITEM_STATE_ENABLED;
1405       public items_number = 0;
1406       public selected = 0;
1407       public temp;
1408    }
1409    parts {
1410       part { name: "bg";
1411          type: RECT;
1412          scale: 1;
1413          mouse_events: 0;
1414          description { state: "default" 0.0;
1415             min: 172 0;
1416             visible: 0;
1417          }
1418          description { state: "icon_text" 0.0;
1419             inherit: "default" 0.0;
1420             min: 229 0;
1421          }
1422       }
1423       part { name: "bg_cover";
1424          type: IMAGE;
1425          scale: 1;
1426          mouse_events: 0;
1427          description { state: "default" 0.0;
1428             visible: 0;
1429             image.normal: "00_tab_press.png";
1430          }
1431          description { state: "pressed" 0.0;
1432             inherit: "default" 0.0;
1433             visible: 1;
1434          }
1435          description { state: "moving" 0.0;
1436             inherit: "default" 0.0;
1437             visible: 1;
1438          }
1439       }
1440       part { name: "padding_left_top";
1441          type: RECT;
1442          scale: 1;
1443          mouse_events: 0;
1444          description { state: "default" 0.0;
1445             align: 0.0 0.0;
1446             rel2.relative: 0.0 0.0;
1447             min: 6 0;
1448             fixed: 1 1;
1449             visible: 0;
1450             color: 0 0 0 0;
1451          }
1452       }
1453       part { name: "padding_right_bottom";
1454          type: RECT;
1455          scale: 1;
1456          mouse_events: 0;
1457          description { state: "default" 0.0;
1458             align: 1.0 1.0;
1459             rel1.relative: 1.0 1.0;
1460             min: 6 0;
1461             fixed: 1 1;
1462             visible: 0;
1463             color: 0 0 0 0;
1464          }
1465       }
1466       part {
1467          name: "icon_rect";
1468          type: RECT;
1469          scale: 1;
1470          mouse_events: 0;
1471          description { state: "default" 0.0;
1472             min: 0 0;
1473             fixed: 1 0;
1474             rel1 {
1475                relative: 1.0 1.0;
1476                to: "padding_left_top";
1477             }
1478             rel2 {
1479                relative: 1.0 0.0;
1480                to_x: "padding_left_top";
1481                to_y: "padding_right_bottom";
1482             }
1483             align: 0.0 0.5;
1484             color: 0 0 0 0;
1485          }
1486          description { state: "visible" 0.0;
1487             inherit: "default" 0.0;
1488             min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1489          }
1490          description { state: "icononly" 0.0;
1491             inherit: "default" 0.0;
1492          }
1493       }
1494       part { name: "padding_after_icon";
1495          type: RECT;
1496          scale: 1;
1497          mouse_events: 0;
1498          description { state: "default" 0.0; //when only icon or no icon is there
1499             align: 0.0 0.0;
1500             rel1 {
1501                relative: 1.0 0.0;
1502                to: "icon_rect";
1503             }
1504             rel2.to: "icon_rect";
1505             fixed: 1 0;
1506             min: 0 0;
1507             color: 0 0 0 0;
1508          }
1509          description { state: "visible" 0.0;
1510             inherit: "default" 0.0;
1511             min: 1 0;
1512          }
1513          description { state: "icononly" 0.0;
1514             inherit: "default" 0.0;
1515          }
1516       }
1517       part { name: "padding_before_text";
1518          type: RECT;
1519          scale: 1;
1520          mouse_events: 0;
1521          description { state: "default" 0.0; //when only icon or no icon is there
1522             align: 1.0 0.5;
1523             rel1 {
1524                relative: 0.0 1.0;
1525                to_x: "elm.text";
1526                to_y: "padding_left_top";
1527             }
1528             rel2 {
1529                relative: 0.0 0.0;
1530                to_x: "elm.text";
1531                to_y: "padding_right_bottom";
1532             }
1533             fixed: 1 0;
1534             min: 8 0;
1535             color: 0 0 0 0;
1536          }
1537       }
1538       part { name: "elm.swallow.icon";
1539          type: SWALLOW;
1540          scale: 1;
1541          clip_to: "elm.icon.clipper";
1542          description { state: "default" 0.0;
1543             visible: 0;
1544             min: TABBAR_ITEM_ICON_SIZE_INC;
1545             max: TABBAR_ITEM_ICON_SIZE_INC;
1546             rel1.to: "padding_left_top";
1547             rel2.to: "padding_right_bottom";
1548             aspect: 1.0 1.0;
1549             aspect_preference: HORIZONTAL;
1550          }
1551          description { state: "visible" 0.0;
1552             fixed: 1 0;
1553             min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1554             max: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1555             align: 1.0 0.5;
1556             rel1 {
1557                relative: 0.0 1.0;
1558                to_x: "padding_before_text";
1559                to_y: "padding_left_top";
1560             }
1561             rel2 {
1562                relative: 0.0 0.0;
1563                to_x: "padding_before_text";
1564                to_y: "padding_right_bottom";
1565             }
1566             aspect: 1.0 1.0;
1567             aspect_preference: HORIZONTAL;
1568          }
1569          description { state: "icononly" 0.0;
1570             inherit: "default" 0.0;
1571             visible: 1;
1572          }
1573       }
1574       part { name: "elm.swallow.icon_new";
1575          type: SWALLOW;
1576          scale: 1;
1577          clip_to: "elm.icon_new.clipper";
1578          description { state: "default" 0.0;
1579             visible: 0;
1580             min: TABBAR_ITEM_ICON_SIZE_INC;
1581             max: TABBAR_ITEM_ICON_SIZE_INC;
1582             rel1.to: "padding_left_top";
1583             rel2.to: "padding_right_bottom";
1584             aspect: 1.0 1.0;
1585             aspect_preference: HORIZONTAL;
1586          }
1587          description { state: "visible" 0.0;
1588             fixed: 0 1;
1589             min: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1590             max: TABBAR_ITEM_SMALL_ICON_SIZE_INC;
1591             rel1 {
1592                relative: 0.0 1.0;
1593                to_x: "padding_before_text";
1594                to_y: "padding_left_top";
1595             }
1596             rel2 {
1597                relative: 0.0 0.0;
1598                to_x: "padding_before_text";
1599                to_y: "padding_right_bottom";
1600             }
1601             aspect: 1.0 1.0;
1602             aspect_preference: HORIZONTAL;
1603          }
1604          description { state: "icononly" 0.0;
1605             inherit: "default" 0.0;
1606             visible: 1;
1607          }
1608       }
1609       part { name: "elm.swallow.icon_new.proxy";
1610          type: PROXY;
1611          scale: 1;
1612          clip_to: "elm.icon_new.proxy.clipper";
1613          description { state: "default" 0.0;
1614              source: "elm.swallow.icon_new";
1615              rel1.to: "elm.swallow.icon_new";
1616              rel1.offset: 0 -3;
1617              rel2.to: "elm.swallow.icon_new";
1618              rel2.offset: -1 -4;
1619          }
1620       }
1621       part { name: "elm.swallow.icon.proxy";
1622          type: PROXY;
1623          scale: 1;
1624          clip_to: "elm.icon.proxy.clipper";
1625          description { state: "default" 0.0;
1626              source: "elm.swallow.icon";
1627              rel1.to: "elm.swallow.icon";
1628              rel1.offset: 0 -3;
1629              rel2.to: "elm.swallow.icon";
1630              rel2.offset: -1 -4;
1631          }
1632       }
1633       part { name: "elm.text";
1634          type: TEXTBLOCK;
1635          mouse_events: 0;
1636          scale: 1;
1637          clip_to: "elm.text.clipper";
1638          description { state: "default" 0.0;
1639             visible: 1;
1640             rel1 {
1641                relative: 1.0 1.0;
1642                to_x: "padding_after_icon";
1643                to_y: "padding_left_top";
1644             }
1645             rel2 {
1646                relative: 0.0 0.0;
1647                to: "padding_right_bottom";
1648             }
1649             fixed: 1 1;
1650             max: 0 78;
1651             text {
1652                style: "toolbar_text_style_30";
1653                min: 0 0;
1654                max: 1 0;
1655             }
1656          }
1657          description { state: "visible" 0.0;
1658             inherit: "default" 0.0;
1659             visible: 1;
1660          }
1661          description { state: "visible" 0.24;
1662             inherit: "visible" 0.0;
1663             max: 0 62;
1664             text.style: "toolbar_text_style_24";
1665          }
1666          description { state: "visible" 0.28;
1667             inherit: "visible" 0.0;
1668             max: 0 72;
1669             text.style: "toolbar_text_style_28";
1670          }
1671          description { state: "visible" 0.30;
1672             inherit: "visible" 0.0;
1673             max: 0 78;
1674             text.style: "toolbar_text_style_30";
1675          }
1676          description { state: "selected" 0.0;
1677             inherit: "visible" 0.0;
1678             text.style: "toolbar_selected_text_style_30";
1679          }
1680          description { state: "selected" 0.24;
1681             inherit: "visible" 0.24;
1682             text.style: "toolbar_selected_text_style_24";
1683          }
1684          description { state: "selected" 0.28;
1685             inherit: "visible" 0.28;
1686             text.style: "toolbar_selected_text_style_28";
1687          }
1688          description { state: "selected" 0.30;
1689             inherit: "visible" 0.30;
1690             text.style: "toolbar_selected_text_style_30";
1691          }
1692       }
1693       part { name: "elm.text_new";
1694          type: TEXTBLOCK;
1695          mouse_events: 0;
1696          scale: 1;
1697          clip_to: "elm.text_new.clipper";
1698          description { state: "default" 0.0;
1699             visible: 0;
1700             rel1 {
1701                relative: 1.0 1.0;
1702                to_x: "padding_after_icon";
1703                to_y: "padding_left_top";
1704             }
1705             rel2 {
1706                relative: 0.0 0.0;
1707                to: "padding_right_bottom";
1708             }
1709             min: 0 36;
1710             max: 9999 36;
1711             fixed: 1 1;
1712             text {
1713                style: "toolbar_text_style_30";
1714                min: 0 0;
1715                max: 0 1;
1716             }
1717          }
1718          description { state: "visible" 0.0;
1719             inherit: "default" 0.0;
1720             visible: 1;
1721          }
1722          description { state: "visible" 0.24;
1723             inherit: "visible" 0.0;
1724             max: 0 62;
1725             text.style: "toolbar_text_style_24";
1726          }
1727          description { state: "visible" 0.28;
1728             inherit: "visible" 0.0;
1729             max: 0 72;
1730             text.style: "toolbar_text_style_28";
1731          }
1732          description { state: "visible" 0.30;
1733             inherit: "visible" 0.0;
1734             max: 0 78;
1735             text.style: "toolbar_text_style_30";
1736          }
1737          description { state: "selected" 0.0;
1738             inherit: "visible" 0.0;
1739             text.style: "toolbar_selected_text_style_30";
1740          }
1741          description { state: "selected" 0.24;
1742             inherit: "visible" 0.24;
1743             text.style: "toolbar_selected_text_style_24";
1744          }
1745          description { state: "selected" 0.28;
1746             inherit: "visible" 0.28;
1747             text.style: "toolbar_selected_text_style_28";
1748          }
1749          description { state: "selected" 0.30;
1750             inherit: "visible" 0.30;
1751             text.style: "toolbar_selected_text_style_30";
1752          }
1753       }
1754       part { name: "padding.selected_line";
1755          type: RECT;
1756          scale: 1;
1757          mouse_events: 0;
1758          description { state: "default" 0.0;
1759             rel1 {
1760                 relative: 0.0 0.5;
1761                 offset: 16 0;
1762             }
1763             rel2 {
1764                 relative: 1.0 0.5;
1765                 offset: -17 -1;
1766             }
1767             min: 0 64;
1768             fixed: 0 1;
1769             visible: 0;
1770          }
1771       }
1772       part { name: "selected_line";
1773          type: RECT;
1774          scale: 1;
1775          mouse_events: 0;
1776          description { state: "default" 0.0;
1777             rel1 {
1778                 to: "padding.selected_line";
1779                 relative: 0.0 1.0;
1780             }
1781             rel2 {
1782                 to: "padding.selected_line";
1783                 relative: 1.0 1.0;
1784             }
1785             align: 0.5 0.0;
1786             color: 59 115 182 255;
1787             min: 0 5;
1788             fixed: 0 1;
1789             visible: 0;
1790          }
1791          description { state: "selected" 0.0;
1792             inherit: "default" 0.0;
1793             visible: 1;
1794          }
1795       }
1796       part { name: "padding.badge";
1797          type: RECT;
1798          scale: 1;
1799          mouse_events: 0;
1800          description { state: "default" 0.0;
1801             align: 1.0 0.5;
1802             rel1 {
1803                 relative: 1.0 0.0;
1804             }
1805             rel2 {
1806                 relative: 1.0 0.5;
1807             }
1808             min: 10 0;
1809             fixed: 1 0;
1810             visible: 0;
1811          }
1812          description { state: "default" 0.10;
1813             inherit: "default" 0.0;
1814             min: 10 0;
1815          }
1816          description { state: "default" 0.06;
1817             inherit: "default" 0.0;
1818             min: 6 0;
1819          }
1820          description { state: "default" 0.04;
1821             inherit: "default" 0.0;
1822             min: 4 0;
1823          }
1824       }
1825       part { name: "elm.image.badge";
1826          mouse_events: 0;
1827          scale: 1;
1828          description { state: "default" 0.0;
1829             visible: 0;
1830             min: 54 48;
1831             fixed: 1 1;
1832             rel1 {
1833                to: "left.padding.text";
1834                relative: 0.0 0.0;
1835             }
1836             rel2 {
1837                to: "right.padding.text";
1838                relative: 1.0 1.0;
1839             }
1840             image {
1841                normal: "00_badge_bg.png";
1842                border: 29 24 0 0;
1843                border_scale: 1;
1844             }
1845          }
1846          description { state: "visible" 0.0;
1847             inherit: "default" 0.0;
1848             visible: 1;
1849          }
1850       }
1851       part { name: "left.padding.text";
1852          type: RECT;
1853          scale: 1;
1854          description {
1855             state: "default" 0.0;
1856             visible: 0;
1857             fixed: 1 1;
1858             min: 13 47;
1859             rel1 {
1860                to: "elm.text.badge";
1861                relative: 0.0 1.0;
1862             }
1863             rel2 {
1864                to: "elm.text.badge";
1865                relative: 0.0 1.0;
1866             }
1867             align: 1.0 1.0;
1868          }
1869       }
1870       part { name: "right.padding.text";
1871          type: RECT;
1872          scale: 1;
1873          description {
1874             state: "default" 0.0;
1875             visible: 0;
1876             fixed: 1 1;
1877             min: 8 48;
1878             rel1 {
1879                to: "padding.badge";
1880                relative: 0.0 1.0;
1881             }
1882             rel2 {
1883                to: "padding.badge";
1884                relative: 0.0 1.0;
1885             }
1886             align: 1.0 1.0;
1887          }
1888       }
1889       part { name: "elm.text.badge";
1890          type: TEXT;
1891          mouse_events: 0;
1892          scale: 1;
1893          description {
1894             state: "default" 0.0;
1895             visible: 0;
1896             rel1 {
1897                to: "right.padding.text";
1898                relative: 0.0 0.0;
1899             }
1900             rel2 {
1901                to: "right.padding.text";
1902                relative: 0.0 1.0;
1903             }
1904             min: 25 0;
1905             fixed: 1 0;
1906             align: 1.0 0.5;
1907             color: 10 100 208 255;
1908             text {
1909                font: "Tizen:style=Bold";
1910                size: 26;
1911                min: 1 1;
1912             }
1913          }
1914          description { state: "visible" 0.0;
1915             inherit: "default" 0.0;
1916             visible: 1;
1917          }
1918       }
1919       part { name: "elm.text.clipper";
1920          type: RECT;
1921          description { state: "default" 0.0;
1922             color: 255 255 255 255;
1923          }
1924          description { state: "animation" 0.0;
1925             color: 255 255 255 0;
1926          }
1927          description { state: "disabled" 0.0;
1928             color: 255 255 255 153;
1929          }
1930       }
1931       part { name: "elm.text_new.clipper";
1932          type: RECT;
1933          description { state: "default" 0.0;
1934             color: 255 255 255 0;
1935          }
1936          description { state: "animation" 0.0;
1937             color: 255 255 255 255;
1938          }
1939          description { state: "disabled" 0.0;
1940             color: 255 255 255 153;
1941          }
1942       }
1943       part { name: "elm.icon.clipper";
1944          type: RECT;
1945          description { state: "default" 0.0;
1946             color: 255 255 255  255;
1947          }
1948          description { state: "animation" 0.0;
1949             color: 255 255 255 0;
1950          }
1951          description { state: "selected" 0.0;
1952             color: 255 255 255 255;
1953          }
1954          description { state: "disabled" 0.0;
1955             color: 255 255 255 153;
1956          }
1957       }
1958       part { name: "elm.icon_new.clipper";
1959          type: RECT;
1960          description { state: "default" 0.0;
1961             color: 255 255 255 0;
1962          }
1963          description { state: "animation" 0.0;
1964             color: 255 255 255 255;
1965          }
1966          description { state: "selected" 0.0;
1967             color: 255 255 255 255;
1968          }
1969          description { state: "disabled" 0.0;
1970             color: 255 255 255 153;
1971          }
1972       }
1973       part { name: "elm.icon.proxy.clipper";
1974          type: RECT;
1975          description { state: "default" 0.0;
1976             color: 153 153 153 255;
1977          }
1978          description { state: "animation" 0.0;
1979             color: 255 255 255 0;
1980          }
1981          description { state: "selected" 0.0;
1982             color: 61 114 180 255;
1983          }
1984          description { state: "disabled" 0.0;
1985             color: 255 255 255 153;
1986          }
1987       }
1988       part { name: "elm.icon_new.proxy.clipper";
1989          type: RECT;
1990          description { state: "default" 0.0;
1991             color: 255 255 255 0;
1992          }
1993          description { state: "animation" 0.0;
1994             color: 255 255 255 255;
1995          }
1996          description { state: "selected" 0.0;
1997             color: 61 114 180 255;
1998          }
1999          description { state: "disabled" 0.0;
2000             color: 255 255 255 153;
2001          }
2002       }
2003       part { name: "divider";
2004          type: RECT;
2005          scale: 1;
2006          description { state: "default" 0.0;
2007             min: 4 26;
2008             max: 4 9999;
2009             fixed: 1 1;
2010             rel1 {
2011                 relative: 1.0 0.5;
2012                 to_y: "elm.swallow.icon";
2013             }
2014             rel2 {
2015                 relative: 1.0 0.5;
2016                 to_y: "elm.swallow.icon";
2017             }
2018          }
2019          description { state: "hidden" 0.0;
2020             inherit: "default" 0.0;
2021             visible: 0;
2022          }
2023       }
2024       part { name: "divider_left";
2025          type: RECT;
2026          clip_to: "divider";
2027          description { state: "default" 0.0;
2028             color: TABBAR_ITEM_DIVIDER_LEFT_COLOR_INC;
2029             rel1 {
2030                 relative: 0.0 0.0;
2031                 to: "divider";
2032             }
2033             rel2 {
2034                 relative: 0.5 1.0;
2035                 to: "divider";
2036             }
2037          }
2038       }
2039       part { name: "divider_right";
2040          type: RECT;
2041          clip_to: "divider";
2042          description { state: "default" 0.0;
2043             color: TABBAR_ITEM_DIVIDER_RIGHT_COLOR_INC;
2044             rel1 {
2045                 relative: 0.5 0.0;
2046                 to: "divider";
2047             }
2048             rel2 {
2049                 relative: 1.0 1.0;
2050                 to: "divider";
2051             }
2052          }
2053       }
2054       part { name: "highlight";
2055          type: IMAGE;
2056          description { state: "default" 0.0;
2057             visible: 0;
2058             image {
2059                 normal: "00_focus.png";
2060                 border: 8 8 8 8;
2061             }
2062          }
2063          description { state: "highlighted" 0.0;
2064             inherit: "default" 0.0;
2065             visible: 1;
2066          }
2067       }
2068       part { name: "event";
2069          type: RECT;
2070          mouse_events: 1;
2071          dragable {
2072             x: 1 0 0;
2073             y: 1 0 0;
2074          }
2075          description { state: "default" 0.0;
2076             color: 0 0 0 0;
2077          }
2078       }
2079    }
2080    programs {
2081       program { name: "go_active";
2082          signal:  "elm,state,selected";
2083          source:  "elm";
2084          action:  STATE_SET "selected" 0.0;
2085          target:  "elm.icon.clipper";
2086          target:  "elm.icon.proxy.clipper";
2087          target:  "selected_line";
2088          after: "selected_text";
2089       }
2090       program { name: "selected_text";
2091          script{
2092             new st[31];
2093             new Float:vl;
2094             set_int(selected, 1);
2095             get_state(PART:"elm.text", st, 30, vl);
2096             if (!strcmp(st, "visible"))
2097               set_state(PART:"elm.text", "selected", vl);
2098          }
2099       }
2100       program { name: "go_passive";
2101          signal:  "elm,state,unselected";
2102          source:  "elm";
2103          action:  STATE_SET "default" 0.0;
2104          target:  "elm.icon.clipper";
2105          target:  "elm.icon.proxy.clipper";
2106          target:  "selected_line";
2107          after: "unselected_text";
2108       }
2109       program { name: "unselected_text";
2110          script{
2111             new st[31];
2112             new Float:vl;
2113             set_int(selected, 0);
2114             get_state(PART:"elm.text", st, 30, vl);
2115             if (!strcmp(st, "selected"))
2116               set_state(PART:"elm.text", "visible", vl);
2117          }
2118       }
2119       program { name: "moving";
2120          signal:  "elm,state,moving";
2121          source:  "elm";
2122          action:  STATE_SET "moving" 0.0;
2123          target:  "bg_cover";
2124       }
2125       program { name: "pressed";
2126          signal:  "mouse,down,1";
2127          source:  "event";
2128          action:  STATE_SET "pressed" 0.0;
2129          target:  "bg_cover";
2130       }
2131       program {
2132          name: "drag";
2133          signal: "drag";
2134          source: "event";
2135          script {
2136             new st[31];
2137             new Float:vl;
2138             new Float:dx, Float:dy;
2139             get_state(PART:"bg_cover", st, 30, vl);
2140             if (strcmp(st, "moving"))
2141               {
2142                 get_drag(PART:"event", dx, dy);
2143                 if ((abs(dx)*abs(dx))+(abs(dy)*abs(dy)) > 400)
2144                   {
2145                     set_drag(PART:"event", 0.0, 0.0);
2146                     set_state(PART:"bg_cover", "default", 0.0);
2147                   }
2148                 set_drag(PART:"event", 0.0, 0.0);
2149               }
2150           }
2151       }
2152       program { name: "unpressed";
2153          signal:  "mouse,up,1";
2154          source:  "event";
2155          script {
2156             set_drag(PART:"event", 0.0, 0.0);
2157             set_state(PART:"bg_cover", "default", 0.0);
2158          }
2159       }
2160       program { name: "go";
2161          signal:  "mouse,clicked,1";
2162          source:  "event";
2163          action:  SIGNAL_EMIT "elm,action,click" "elm";
2164          after: "play_sound";
2165       }
2166       program { name: "play_sound";
2167          action: PLAY_SAMPLE "touch_sound" 1.0;
2168       }
2169       program { name: "mouse,in";
2170          signal:  "mouse,in";
2171          source:  "event";
2172          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
2173       }
2174       program { name: "mouse,out";
2175          signal:  "mouse,out";
2176          source:  "event";
2177          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
2178       }
2179       program { name: "disable";
2180          signal: "elm,state,disabled";
2181          source: "elm";
2182          script {
2183             set_int(item_state, ITEM_STATE_DISABLED);
2184             set_state(PART:"bg", "disabled", 0.0);
2185             set_state(PART:"elm.text.clipper", "disabled", 0.0);
2186             set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2187             set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2188             run_program(PROGRAM:"label_set,animation,done");
2189             run_program(PROGRAM:"icon_set,animation,done");
2190          }
2191       }
2192       program { name: "enable";
2193          signal: "elm,state,enabled";
2194          source: "elm";
2195          script {
2196             set_int(item_state, ITEM_STATE_ENABLED);
2197             set_state(PART:"bg", "default", 0.0);
2198             set_state(PART:"elm.text.clipper", "default", 0.0);
2199             set_state(PART:"elm.icon.clipper", "default", 0.0);
2200             set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2201             run_program(PROGRAM:"label_set,animation,done");
2202             run_program(PROGRAM:"icon_set,animation,done");
2203          }
2204       }
2205       program { name: "label_set,animation,forward";
2206          signal: "elm,state,label_set,forward";
2207          source: "elm";
2208          after: "label_set,sync";
2209       }
2210       program { name: "label_set,animation,backward";
2211          signal: "elm,state,label_set,backward";
2212          source: "elm";
2213          after: "label_set,sync";
2214       }
2215       program { name: "label_set,sync";
2216          signal: "elm,state,label_set";
2217          source: "elm";
2218          script {
2219             new st[31];
2220             new Float:vl;
2221             get_state(PART:"elm.text", st, 30, vl);
2222             set_state(PART:"elm.text_new", st, vl);
2223          }
2224          after: "label_set,animation";
2225       }
2226       program { name: "label_set,animation";
2227          action: STATE_SET "animation" 0.0;
2228          target: "elm.text.clipper";
2229          target: "elm.text_new.clipper";
2230          transition: LINEAR 0.2;
2231          after: "label_set,animation,done";
2232       }
2233       program { name: "label_set,animation,done";
2234          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
2235       }
2236       program { name: "label,reset";
2237          signal: "elm,state,label,reset";
2238          source: "elm";
2239          script {
2240             set_state(PART:"elm.text_new.clipper", "default", 0.0);
2241             if (get_int(item_state) != ITEM_STATE_DISABLED)
2242               set_state(PART:"elm.text.clipper", "default", 0.0);
2243             else
2244               set_state(PART:"elm.text.clipper", "disabled", 0.0);
2245          }
2246       }
2247       program { name: "icon_set,animation,forward";
2248          signal: "elm,state,icon_set,forward";
2249          source: "elm";
2250          after: "icon_set,animation";
2251       }
2252       program { name: "icon_set,animation,backward";
2253          signal: "elm,state,icon_set,backward";
2254          source: "elm";
2255          after: "icon_set,animation";
2256       }
2257       program { name: "icon_set,animation";
2258          signal: "elm,state,icon_set";
2259          source: "elm";
2260          action: STATE_SET "animation" 0.0;
2261          target: "elm.icon.clipper";
2262          target: "elm.icon_new.clipper";
2263          target: "elm.icon.proxy.clipper";
2264          target: "elm.icon_new.proxy.clipper";
2265          transition: LINEAR 0.2;
2266          after: "icon_set,animation,done";
2267       }
2268       program { name: "icon_set,animation,done";
2269          action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
2270       }
2271       program { name: "icon,reset";
2272          signal: "elm,state,icon,reset";
2273          source: "elm";
2274          script {
2275             set_state(PART:"elm.icon_new.clipper", "default", 0.0);
2276             if (get_int(item_state) != ITEM_STATE_DISABLED)
2277               {
2278                  set_state(PART:"elm.icon.clipper", "default", 0.0);
2279                  set_state(PART:"elm.icon.proxy.clipper", "default", 0.0);
2280               }
2281             else
2282               {
2283                  set_state(PART:"elm.icon.clipper", "disabled", 0.0);
2284                  set_state(PART:"elm.icon.proxy.clipper", "disabled", 0.0);
2285               }
2286          }
2287       }
2288       program { name: "text_show";
2289          signal: "elm,state,text,visible";
2290          source: "elm";
2291          script {
2292             new st[31];
2293             new Float:vl;
2294             get_state(PART:"elm.swallow.icon", st, 30, vl);
2295             if (!strcmp(st, "icononly"))
2296               {
2297                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
2298                  set_state(PART:"icon_rect", "visible", 0.0);
2299                  set_state(PART:"padding_after_icon", "visible", 0.0);
2300                  set_state(PART:"bg", "icon_text", 0.0);
2301               }
2302             get_state(PART:"elm.text", st, 30, vl);
2303             if (!strcmp(st, "default"))
2304               {
2305                 if (get_int(selected))
2306                   set_str(temp, "selected");
2307                 else
2308                   set_str(temp, "visible");
2309                 get_str(temp, st, 31);
2310
2311                 if (get_int(items_number) <= 2)
2312                   set_state(PART:"elm.text", st, 0.30);
2313                 else if (get_int(items_number) == 3)
2314                   set_state(PART:"elm.text", st, 0.28);
2315                 else if (get_int(items_number) >= 4)
2316                   {
2317                     get_state(PART:"bg", st, 30, vl);
2318                     if (!strcmp(st, "icon_text"))
2319                       set_state(PART:"elm.text", st, 0.28);
2320                     else
2321                       set_state(PART:"elm.text", st, 0.24);
2322                   }
2323               }
2324          }
2325       }
2326       program { name: "text_hide";
2327          signal: "elm,state,text,hidden";
2328          source: "elm";
2329          script {
2330             new st[31];
2331             new Float:vl;
2332             get_state(PART:"elm.swallow.icon", st, 30, vl);
2333             if (!strcmp(st, "visible"))
2334               {
2335                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2336                  set_state(PART:"icon_rect", "icononly", 0.0);
2337                  set_state(PART:"padding_after_icon", "icononly", 0.0);
2338               }
2339             set_state(PART:"elm.text", "default", 0.0);
2340             set_state(PART:"bg", "default", 0.0);
2341          }
2342       }
2343       program { name: "icon_show";
2344          signal: "elm,state,icon,visible";
2345          source: "elm";
2346          script {
2347             new st[31];
2348             new Float:vl;
2349             get_state(PART:"elm.text", st, 30, vl);
2350             if (!strncmp(st, "visible", 7))
2351               {
2352                  set_state(PART:"elm.swallow.icon", "visible", 0.0);
2353                  set_state(PART:"icon_rect", "visible", 0.0);
2354                  set_state(PART:"padding_after_icon", "visible", 0.0);
2355                  set_state(PART:"bg", "icon_text", 0.0);
2356               }
2357             else
2358               {
2359                  set_state(PART:"elm.swallow.icon", "icononly", 0.0);
2360                  set_state(PART:"icon_rect", "icononly", 0.0);
2361                  set_state(PART:"padding_after_icon", "icononly", 0.0);
2362               }
2363          }
2364       }
2365       program { name: "icon_hide";
2366          signal: "elm,state,icon,hidden";
2367          source: "elm";
2368          script {
2369             set_state(PART:"elm.swallow.icon", "default", 0.0);
2370             set_state(PART:"icon_rect", "default", 0.0);
2371             set_state(PART:"padding_after_icon", "default", 0.0);
2372             set_state(PART:"bg", "default", 0.0);
2373          }
2374       }
2375       program { name: "text_only_item_1";
2376          signal: "elm,number,item,1";
2377          source: "elm";
2378          script {
2379             set_int(items_number, 1);
2380          }
2381          after: "text_only_item_under_2";
2382       }
2383       program { name: "text_only_item_2";
2384          signal: "elm,number,item,2";
2385          source: "elm";
2386          script {
2387             set_int(items_number, 2);
2388          }
2389          after: "text_only_item_under_2";
2390       }
2391       program { name: "text_only_item_under_2";
2392          script {
2393             new st[31];
2394             new Float:vl;
2395             get_state(PART:"elm.text", st, 30, vl);
2396             if (!strncmp(st, "visible", 7))
2397               {
2398                   set_state(PART:"elm.text", st, 0.30);
2399               }
2400             set_state(PART:"padding.badge", "default", 0.10);
2401          }
2402       }
2403       program { name: "text_only_item_3";
2404          signal: "elm,number,item,3";
2405          source: "elm";
2406          script {
2407             new st[31];
2408             new Float:vl;
2409             set_int(items_number, 3);
2410             get_state(PART:"elm.text", st, 30, vl);
2411             if (!strncmp(st, "visible", 7))
2412               {
2413                   set_state(PART:"elm.text", st, 0.28);
2414               }
2415             set_state(PART:"padding.badge", "default", 0.06);
2416          }
2417       }
2418       program { name: "text_only_item_4";
2419          signal: "elm,number,item,4";
2420          source: "elm";
2421          script {
2422             set_int(items_number, 4);
2423          }
2424          after: "text_only_item_upper_4";
2425       }
2426       program { name: "text_only_item_5";
2427          signal: "elm,number,item,5";
2428          source: "elm";
2429          script {
2430             set_int(items_number, 5);
2431          }
2432          after: "text_only_item_upper_4";
2433       }
2434       program { name: "text_only_item_6";
2435          signal: "elm,number,item,6";
2436          source: "elm";
2437          script {
2438             set_int(items_number, 6);
2439          }
2440          after: "text_only_item_upper_4";
2441       }
2442       program { name: "text_only_item_7";
2443          signal: "elm,number,item,7";
2444          source: "elm";
2445          script {
2446             set_int(items_number, 7);
2447          }
2448          after: "text_only_item_upper_4";
2449       }
2450       program { name: "text_only_item_8";
2451          signal: "elm,number,item,8";
2452          source: "elm";
2453          script {
2454             set_int(items_number, 8);
2455          }
2456          after: "text_only_item_upper_4";
2457       }
2458       program { name: "text_only_item_9";
2459          signal: "elm,number,item,9";
2460          source: "elm";
2461          script {
2462             set_int(items_number, 9);
2463          }
2464          after: "text_only_item_upper_4";
2465       }
2466       program { name: "text_only_item_10";
2467          signal: "elm,number,item,10";
2468          source: "elm";
2469          script {
2470             set_int(items_number, 10);
2471          }
2472          after: "text_only_item_upper_4";
2473       }
2474       program { name: "text_only_item_upper_4";
2475          script {
2476             new st[31];
2477             new stb[31];
2478             new Float:vl;
2479             get_state(PART:"elm.text", st, 30, vl);
2480             if (!strcmp(st, "visible") || !strcmp(st, "selected"))
2481               {
2482                   get_state(PART:"bg", stb, 30, vl);
2483                   if (!strcmp(stb, "icon_text"))
2484                     set_state(PART:"elm.text", st, 0.28);
2485                   else
2486                     set_state(PART:"elm.text", st, 0.24);
2487               }
2488             get_state(PART:"bg", stb, 30, vl);
2489             if (!strcmp(stb, "icon_text"))
2490               set_state(PART:"padding.badge", "default", 0.06);
2491             else
2492               set_state(PART:"padding.badge", "default", 0.04);
2493          }
2494       }
2495       program { name: "badge_show";
2496          signal: "elm,state,elm.text.badge,visible";
2497          source: "elm";
2498          action: STATE_SET "visible" 0.0;
2499          target: "elm.text.badge";
2500          target: "elm.image.badge";
2501       }
2502       program { name: "badge_hide";
2503          signal: "elm,state,elm.text.badge,hidden";
2504          source: "elm";
2505          action:  STATE_SET "default" 0.0;
2506          target: "elm.text.badge";
2507          target: "elm.image.badge";
2508       }
2509       program { name: "divider_visible";
2510          signal: "elm,order,first,item";
2511          signal: "elm,order,default,item";
2512          source: "elm";
2513          action: STATE_SET "default" 0.0;
2514          target: "divider";
2515       }
2516       program { name: "divider_hidden";
2517          signal: "elm,order,last,item";
2518          source: "elm";
2519          action: STATE_SET "hidden" 0.0;
2520          target: "divider";
2521       }
2522       program { name: "highlight_on";
2523          signal: "elm,highlight,on";
2524          source: "elm";
2525          action: STATE_SET "highlighted" 0.0;
2526          target: "highlight";
2527       }
2528       program { name: "highlight_off";
2529          signal: "elm,highlight,off";
2530          source: "elm";
2531          action: STATE_SET "default" 0.0;
2532          target: "highlight";
2533       }
2534    }
2535 }
2536
2537 group { name: "elm/toolbar/base/tabbar/item_horizontal";
2538    inherit: "elm/toolbar/base/tabbar";
2539    parts {
2540       part { name: "left_padding";
2541          description {
2542             state: "default" 0.0;
2543             min: 34 0;
2544          }
2545       }
2546       part { name: "right_padding";
2547          description {
2548             state: "default" 0.0;
2549             min: 34 0;
2550          }
2551       }
2552    }
2553 }
2554
2555 group { name: "elm/toolbar/item/tabbar/item_horizontal";
2556    inherit: "elm/toolbar/item/tabbar";
2557    parts {
2558       part { name: "bg";
2559          description { state: "default" 0.0;
2560             min: 303 0;
2561          }
2562          description { state: "icon_text" 0.0;
2563             min: 404 0;
2564          }
2565       }
2566    }
2567 }