4d1d2f0cfe983f5f5a9053e7d93f0e979cba4dae
[framework/uifw/elementary.git] / data / themes / widgets / toolbar.edc
1 group { name: "elm/toolbar/base/default";
2    images {
3       image: "bt_dis_base.png" COMP;
4       image: "bt_dis_hilight.png" COMP;
5       image: "bt_dis_shine.png" COMP;
6       image: "icon_left_arrow.png" COMP;
7       image: "icon_right_arrow.png" COMP;
8    }
9    parts {
10       part { name: "base";
11          mouse_events: 1;
12          description { state: "default" 0.0;
13             rel1 {
14                relative: 0.0 0.0;
15                offset: 2 2;
16             }
17             rel2.offset: -3 -3;
18             image {
19                normal: "bt_dis_base.png";
20                border: 4 4 4 4;
21             }
22             image.middle: SOLID;
23          }
24       }
25       part { name: "clipper";
26          type: RECT;
27          mouse_events: 0;
28          description {
29             state: "default" 0.0;
30             rel1 {
31                to: "base";
32                offset: 2 2;
33             }
34             rel2 {
35                to: "base";
36                offset: -3 -3;
37             }
38          }
39       }
40       part { name: "elm.swallow.content";
41          clip_to: "clipper";
42          type: SWALLOW;
43          description {
44             state: "default" 0.0;
45             rel1.to: "clipper";
46             rel2.to: "clipper";
47          }
48       }
49       part { name: "over2";
50          mouse_events: 0;
51          description { state: "default" 0.0;
52             rel1.to: "base";
53             rel2.to: "base";
54             image {
55                normal: "bt_dis_shine.png";
56                border: 4 4 4 4;
57             }
58          }
59       }
60       part { name: "over1";
61          mouse_events: 0;
62          description { state: "default" 0.0;
63             rel1.to: "base";
64             rel2.to: "base";
65             rel2.relative: 1.0 0.5;
66             image {
67                normal: "bt_dis_hilight.png";
68                border: 4 4 4 0;
69             }
70             color: 255 255 255 128;
71          }
72       }
73       part { name: "left_arrow";
74          mouse_events: 0;
75          description { state: "default" 0.0;
76             image.normal: "icon_left_arrow.png";
77             aspect: 1.0 1.0;
78             aspect_preference: VERTICAL;
79             align: 0.0 0.5;
80             min: 32 32;
81             max: 32 32;
82          }
83          description { state: "hidden" 0.0;
84             inherit: "default" 0.0;
85             visible: 0;
86             color: 255 255 255 0;
87          }
88       }
89       part { name: "right_arrow";
90          mouse_events: 0;
91          description { state: "default" 0.0;
92             image.normal: "icon_right_arrow.png";
93             aspect: 1.0 1.0;
94             aspect_preference: VERTICAL;
95             align: 1.0 0.5;
96             min: 32 32;
97             max: 32 32;
98          }
99          description { state: "hidden" 0.0;
100             inherit: "default" 0.0;
101             visible: 0;
102             color: 255 255 255 0;
103          }
104       }
105       part { name: "event";
106          type: RECT;
107          mouse_events: 1;
108          repeat_events: 1;
109          description { state: "default" 0.0;
110             color: 0 0 0 0;
111          }
112       }
113    }
114    programs {
115       program { name: "sb_hbar_show";
116          signal: "elm,action,show,hbar";
117          source: "elm";
118          action:  STATE_SET "default" 0.0;
119          transition: LINEAR 0.5;
120          target: "left_arrow";
121          target: "right_arrow";
122       }
123       program { name: "sb_hbar_hide";
124          signal: "elm,action,hide,hbar";
125          source: "elm";
126          action:  STATE_SET "hidden" 0.0;
127          target: "left_arrow";
128          target: "right_arrow";
129          transition: LINEAR 0.5;
130       }
131    }
132 }
133
134 group { name: "elm/toolbar/item/default";
135    images {
136       image: "toolbar_sel.png" COMP;
137    }
138    data.item: "transition_animation_on" "1";
139    parts {
140       part { name: "label2";
141          type: TEXT;
142          mouse_events:  0;
143          scale: 1;
144          clip_to: "elm.text.clipper";
145          description { state: "default" 0.0;
146             align: 0.5 1.0;
147             fixed: 0 1;
148             rel1.to: "elm.text";
149             rel2.to: "elm.text";
150             color: 0 0 0 255;
151             text {
152                font: "Sans";
153                text_source: "elm.text";
154                size: 10;
155                min: 1 1;
156                align: 0.5 0.5;
157                text_class: "toolbar_item";
158             }
159          }
160          description { state: "selected" 0.0;
161             inherit: "default" 0.0;
162             visible: 0;
163          }
164          description { state: "disabled" 0.0;
165             inherit: "default" 0.0;
166             color: 0 0 0 128;
167             color3: 0 0 0 0;
168          }
169          description { state: "disabled_visible" 0.0;
170             inherit: "default" 0.0;
171             color: 0 0 0 128;
172             color3: 0 0 0 0;
173             visible: 1;
174             text.min: 1 1;
175          }
176       }
177       part { name: "label2_new";
178          type: TEXT;
179          mouse_events:  0;
180          scale: 1;
181          clip_to: "elm.text_new.clipper";
182          description { state: "default" 0.0;
183             align: 0.5 1.0;
184             fixed: 0 1;
185             rel1.to: "elm.text_new";
186             rel2.to: "elm.text_new";
187             color: 0 0 0 255;
188             text {
189                font: "Sans";
190                text_source: "elm.text_new";
191                size: 10;
192                min: 1 1;
193                align: 0.5 0.5;
194                text_class: "toolbar_item";
195             }
196          }
197          description { state: "selected" 0.0;
198             inherit: "default" 0.0;
199             visible: 0;
200          }
201          description { state: "disabled" 0.0;
202             inherit: "default" 0.0;
203             color: 0 0 0 128;
204             color3: 0 0 0 0;
205          }
206          description { state: "disabled_visible" 0.0;
207             inherit: "default" 0.0;
208             color: 0 0 0 128;
209             color3: 0 0 0 0;
210             visible: 1;
211             text.min: 1 1;
212          }
213       }
214       part { name: "bg";
215          mouse_events: 0;
216          description { state: "default" 0.0;
217             visible: 0;
218             color: 255 255 255 0;
219             image {
220                normal: "toolbar_sel.png";
221                border: 3 3 0 0;
222             }
223             image.middle: SOLID;
224             fill.smooth: 0;
225          }
226          description { state: "selected" 0.0;
227             inherit: "default" 0.0;
228             visible: 1;
229             color: 255 255 255 255;
230          }
231          description { state: "disabled" 0.0;
232             inherit: "default" 0.0;
233             visible: 0;
234             color: 255 255 255 0;
235          }
236       }
237       part { name: "elm.swallow.icon";
238          type: SWALLOW;
239          clip_to: "elm.icon.clipper";
240          description { state: "default" 0.0;
241             align: 0.5 0.5;
242             rel1 {
243                relative: 0.0 0.0;
244                offset: 2 2;
245             }
246             rel2 {
247                to_y: "elm.text";
248                relative: 1.0 0.0;
249                offset: -3 -1;
250             }
251             color: 0 0 0 0;
252          }
253       }
254       part { name: "elm.swallow.icon_new";
255          type: SWALLOW;
256          clip_to: "elm.icon_new.clipper";
257          description { state: "default" 0.0;
258             align: 0.5 0.5;
259             rel1 {
260                relative: 0.0 0.0;
261                offset: 2 2;
262             }
263             rel2 {
264                to_y: "elm.text_new";
265                relative: 1.0 0.0;
266                offset: -3 -1;
267             }
268             color: 0 0 0 0;
269          }
270       }
271       part { name: "elm.text";
272          type: TEXT;
273          effect: SOFT_SHADOW;
274          mouse_events:  0;
275          scale: 1;
276          clip_to: "elm.text.clipper";
277          description { state: "default" 0.0;
278             align: 0.5 1.0;
279             fixed: 0 1;
280             rel1 {
281                relative: 0.0 1.0;
282                offset:   0 -1;
283             }
284             rel2 {
285                relative: 1.0 1.0;
286                offset:   -1 -1;
287             }
288             visible: 0;
289             color: 224 224 224 255;
290             color3: 0 0 0 32;
291             text {
292                font: "Sans:style=Bold";
293                size: 10;
294                min: 1 1;
295                align: 0.5 0.5;
296                text_class: "toolbar_item";
297             }
298          }
299          description { state: "selected" 0.0;
300             inherit: "default" 0.0;
301             visible: 1;
302          }
303          description { state: "visible" 0.0;
304             inherit: "default" 0.0;
305             visible: 1;
306             text.min: 1 1;
307          }
308          description { state: "disabled" 0.0;
309             inherit: "default" 0.0;
310             color: 0 0 0 128;
311             color3: 0 0 0 0;
312          }
313          description { state: "disabled_visible" 0.0;
314             inherit: "default" 0.0;
315             color: 0 0 0 128;
316             color3: 0 0 0 0;
317             visible: 1;
318             text.min: 1 1;
319          }
320       }
321       part { name: "elm.text_new";
322          type: TEXT;
323          effect: SOFT_SHADOW;
324          mouse_events:  0;
325          clip_to: "elm.text_new.clipper";
326          scale: 1;
327          description { state: "default" 0.0;
328             align: 0.5 1.0;
329             fixed: 0 1;
330             rel1 {
331                relative: 0.0 1.0;
332                offset:   0 -1;
333             }
334             rel2 {
335                relative: 1.0 1.0;
336                offset:   -1 -1;
337             }
338             visible: 0;
339             color: 224 224 224 255;
340             color3: 0 0 0 32;
341             text {
342                font: "Sans:style=Bold";
343                size: 10;
344                min: 1 1;
345                align: 0.5 0.5;
346                text_class: "toolbar_item";
347             }
348          }
349          description { state: "selected" 0.0;
350             inherit: "default" 0.0;
351             visible: 1;
352          }
353          description { state: "visible" 0.0;
354             inherit: "default" 0.0;
355             visible: 1;
356             text.min: 1 1;
357          }
358          description { state: "disabled" 0.0;
359             inherit: "default" 0.0;
360             color: 0 0 0 128;
361             color3: 0 0 0 0;
362          }
363          description { state: "disabled_visible" 0.0;
364             inherit: "default" 0.0;
365             color: 0 0 0 128;
366             color3: 0 0 0 0;
367             visible: 1;
368             text.min: 1 1;
369          }
370       }
371       part { name: "elm.text.clipper";
372          type: RECT;
373          description { state: "default" 0.0;
374             color: 255 255 255 255;
375          }
376          description { state: "animation" 0.0;
377             color: 255 255 255 0;
378          }
379       }
380       part { name: "elm.text_new.clipper";
381          type: RECT;
382          description { state: "default" 0.0;
383             color: 255 255 255 0;
384          }
385          description { state: "animation" 0.0;
386             color: 255 255 255 255;
387          }
388       }
389       part { name: "elm.icon.clipper";
390          type: RECT;
391          description { state: "default" 0.0;
392             color: 255 255 255 255;
393          }
394          description { state: "animation" 0.0;
395             color: 255 255 255 0;
396          }
397       }
398       part { name: "elm.icon_new.clipper";
399          type: RECT;
400          description { state: "default" 0.0;
401             color: 255 255 255 0;
402          }
403          description { state: "animation" 0.0;
404             color: 255 255 255 255;
405          }
406       }
407       part { name: "event";
408          type: RECT;
409          mouse_events: 1;
410          ignore_flags: ON_HOLD;
411          description { state: "default" 0.0;
412             color: 0 0 0 0;
413          }
414       }
415    }
416    programs {
417       program { name: "go_active";
418          signal:  "elm,state,selected";
419          source:  "elm";
420          action:  STATE_SET "selected" 0.0;
421          target:  "bg";
422          target:  "elm.text";
423          target:  "label2";
424          target:  "elm.text_new";
425          target:  "label2_new";
426          transition: LINEAR 0.2;
427       }
428       program { name: "go_passive";
429          signal:  "elm,state,unselected";
430          source:  "elm";
431          action:  STATE_SET "default" 0.0;
432          target:  "bg";
433          target:  "elm.text";
434          target:  "label2";
435          target:  "elm.text_new";
436          target:  "label2_new";
437          transition: LINEAR 0.1;
438       }
439       program { name: "go";
440          signal:  "mouse,clicked,1";
441          source:  "event";
442          action:  SIGNAL_EMIT "elm,action,click" "elm";
443       }
444       program { name: "mouse,in";
445          signal:  "mouse,in";
446          source:  "event";
447          action:  SIGNAL_EMIT "elm,mouse,in" "elm";
448       }
449       program { name: "mouse,out";
450          signal:  "mouse,out";
451          source:  "event";
452          action:  SIGNAL_EMIT "elm,mouse,out" "elm";
453       }
454       program { name: "disable";
455          signal: "elm,state,disabled";
456          source: "elm";
457          action: STATE_SET "disabled" 0.0;
458          target: "label2";
459          target: "label2_new";
460          target: "bg";
461          after: "disable_text";
462       }
463       program { name: "disable_text";
464          script {
465             new st[31];
466             new Float:vl;
467             get_state(PART:"elm.text", st, 30, vl);
468             if (!strcmp(st, "visible"))
469             {
470                set_state(PART:"elm.text", "disabled_visible", 0.0);
471                set_state(PART:"elm.text_new", "disabled_visible", 0.0);
472             }
473             else
474             {
475                set_state(PART:"elm.text", "disabled", 0.0);
476                set_state(PART:"elm.text_new", "disabled", 0.0);
477             }
478          }
479       }
480       program { name: "enable";
481          signal: "elm,state,enabled";
482          source: "elm";
483          action: STATE_SET "default" 0.0;
484          target: "label2";
485          target: "label2_new";
486          target: "bg";
487          after: "enable_text";
488       }
489       program { name: "enable_text";
490          script {
491             new st[31];
492             new Float:vl;
493             get_state(PART:"elm.text", st, 30, vl);
494             if (!strcmp(st, "disabled_visible"))
495             {
496                set_state(PART:"elm.text", "visible", 0.0);
497                set_state(PART:"elm.text_new", "visible", 0.0);
498             }
499             else
500             {
501                set_state(PART:"elm.text", "default", 0.0);
502                set_state(PART:"elm.text_new", "default", 0.0);
503             }
504          }
505       }
506       program { name: "label_set,animation,forward";
507          signal: "elm,state,label_set,forward";
508          source: "elm";
509          after: "label_set,animation";
510       }
511       program { name: "label_set,animation,backward";
512          signal: "elm,state,label_set,backward";
513          source: "elm";
514          after: "label_set,animation";
515       }
516       program { name: "label_set,animation";
517          signal: "elm,state,label_set";
518          source: "elm";
519          action: STATE_SET "animation" 0.0;
520          target: "elm.text.clipper";
521          target: "elm.text_new.clipper";
522          transition: LINEAR 0.2;
523          after: "label_set,animation,done";
524       }
525       program { name: "label_set,animation,done";
526          action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
527       }
528       program { name: "label,reset";
529          signal: "elm,state,label,reset";
530          source: "elm";
531          action: STATE_SET "default" 0.0;
532          target: "elm.text.clipper";
533          target: "elm.text_new.clipper";
534       }
535       program { name: "icon_set,animation,forward";
536          signal: "elm,state,icon_set,forward";
537          source: "elm";
538          after: "icon_set,animation";
539       }
540       program { name: "icon_set,animation,backward";
541          signal: "elm,state,icon_set,backward";
542          source: "elm";
543          after: "icon_set,animation";
544       }
545       program { name: "icon_set,animation";
546          signal: "elm,state,icon_set";
547          source: "elm";
548          action: STATE_SET "animation" 0.0;
549          target: "elm.icon.clipper";
550          target: "elm.icon_new.clipper";
551          transition: LINEAR 0.2;
552          after: "icon_set,animation,done";
553       }
554       program { name: "icon_set,animation,done";
555          action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
556       }
557       program { name: "icon,reset";
558          signal: "elm,state,icon,reset";
559          source: "elm";
560          action: STATE_SET "default" 0.0;
561          target: "elm.icon.clipper";
562          target: "elm.icon_new.clipper";
563       }
564    }
565 }
566
567 group { name: "elm/toolbar/item/item_horizontal";
568    inherit: "elm/toolbar/item/default";
569    parts {
570       part { name: "elm.swallow.icon";
571          description { state: "default" 0.0;
572             fixed: 1 1;
573             aspect: 1 1;
574             aspect_preference: VERTICAL;
575             align: 0.0 0.5;
576             rel1.offset: 3 3;
577             rel1.relative: 0 0;
578             rel2.offset: 3 -4;
579             rel2.relative: 0 1;
580             color: 0 0 0 0;
581          }
582       }
583       part { name: "elm.swallow.icon_new";
584          description { state: "default" 0.0;
585             fixed: 1 1;
586          }
587       }
588       part { name: "elm.text";
589          description { state: "default" 0.0;
590             align: 1 0.5;
591             min: 0 1;
592             rel1.offset: 1 0;
593             rel1.relative: 1.0 0.0;
594             rel1.to_x: "elm.swallow.icon";
595             rel2.relative: 1.0 1.0;
596             text.align: 0 0.5;
597          }
598          description { state: "selected" 0.0;
599             inherit: "default" 0.0;
600             visible: 1;
601          }
602          description { state: "visible" 0.0;
603             inherit: "default" 0.0;
604             visible: 1;
605             text.min: 1 1;
606          }
607          description { state: "disabled" 0.0;
608             inherit: "default" 0.0;
609             color: 0 0 0 128;
610             color3: 0 0 0 0;
611          }
612          description { state: "disabled_visible" 0.0;
613             inherit: "default" 0.0;
614             color: 0 0 0 128;
615             color3: 0 0 0 0;
616             visible: 1;
617             text.min: 1 1;
618          }
619       }
620       part { name: "elm.text_new";
621          description { state: "default" 0.0;
622             align: 1 0.5;
623             min: 0 1;
624             rel1.offset: 1 0;
625             rel1.relative: 1.0 0.0;
626             rel1.to_x: "elm.swallow.icon";
627             rel2.relative: 1.0 1.0;
628             text.align: 0 0.5;
629          }
630          description { state: "selected" 0.0;
631             inherit: "default" 0.0;
632             visible: 1;
633          }
634          description { state: "visible" 0.0;
635             inherit: "default" 0.0;
636             visible: 1;
637             text.min: 1 1;
638          }
639          description { state: "disabled" 0.0;
640             inherit: "default" 0.0;
641             color: 0 0 0 128;
642             color3: 0 0 0 0;
643          }
644          description { state: "disabled_visible" 0.0;
645             inherit: "default" 0.0;
646             color: 0 0 0 128;
647             color3: 0 0 0 0;
648             visible: 1;
649             text.min: 1 1;
650          }
651       }
652    }
653 }
654
655 group { name: "elm/toolbar/separator/default";
656    images {
657       image: "toolbar_separator_v.png" COMP;
658    }
659    parts {
660       part { name: "separator"; // separator group
661          description { state: "default" 0.0;
662             min: 2 2;
663             max: 2 9999;
664             rel1.offset: 4 4;
665             rel2.offset: -5 -5;
666             image {
667                normal: "toolbar_separator_v.png";
668             }
669             fill {
670                smooth: 0;
671             }
672          }
673       }
674    }
675 }
676
677 group { name: "elm/toolbar/object/default";
678    parts {
679       part { name: "elm.swallow.object"; // object group
680          type: SWALLOW;
681          description { state: "default" 0.0;
682          }
683       }
684    }
685 }