summaryrefslogtreecommitdiff
path: root/legacy/elementary/data
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-03-16 23:45:48 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-16 23:45:48 +0000
commit83e0754a8b5b27fe626ef425a2233ee9c7ac5bfa (patch)
tree02a46bbdc6a86ca79c2361d48b7a025ff7f44488 /legacy/elementary/data
parentde4c59710eae8a4be27a82bfdb2b8f4eed6bcd5d (diff)
clean up toggle turds :)
SVN revision: 69478
Diffstat (limited to 'legacy/elementary/data')
-rw-r--r--legacy/elementary/data/edje_externals/Makefile.am1
-rw-r--r--legacy/elementary/data/edje_externals/ico_toggle.pngbin200 -> 0 bytes
-rw-r--r--legacy/elementary/data/edje_externals/icons.edc1
-rw-r--r--legacy/elementary/data/themes/Makefile.am1
-rw-r--r--legacy/elementary/data/themes/default.edc1
-rw-r--r--legacy/elementary/data/themes/widgets/check.edc445
-rw-r--r--legacy/elementary/data/themes/widgets/toggle.edc444
7 files changed, 445 insertions, 448 deletions
diff --git a/legacy/elementary/data/edje_externals/Makefile.am b/legacy/elementary/data/edje_externals/Makefile.am
index 59de514..cdf7363 100644
--- a/legacy/elementary/data/edje_externals/Makefile.am
+++ b/legacy/elementary/data/edje_externals/Makefile.am
@@ -33,7 +33,6 @@ ico_slider.png \
33ico_slideshow.png \ 33ico_slideshow.png \
34ico_spinner.png \ 34ico_spinner.png \
35ico_thumb.png \ 35ico_thumb.png \
36ico_toggle.png \
37ico_toolbar.png 36ico_toolbar.png
38 37
39icons.edj: Makefile $(EXTRA_DIST) 38icons.edj: Makefile $(EXTRA_DIST)
diff --git a/legacy/elementary/data/edje_externals/ico_toggle.png b/legacy/elementary/data/edje_externals/ico_toggle.png
deleted file mode 100644
index e22086a..0000000
--- a/legacy/elementary/data/edje_externals/ico_toggle.png
+++ /dev/null
Binary files differ
diff --git a/legacy/elementary/data/edje_externals/icons.edc b/legacy/elementary/data/edje_externals/icons.edc
index e36ccea..34962c0 100644
--- a/legacy/elementary/data/edje_externals/icons.edc
+++ b/legacy/elementary/data/edje_externals/icons.edc
@@ -31,7 +31,6 @@ ICON("slider")
31ICON("slideshow") 31ICON("slideshow")
32ICON("spinner") 32ICON("spinner")
33ICON("thumb") 33ICON("thumb")
34ICON("toggle")
35ICON("toolbar") 34ICON("toolbar")
36ICON("slideshow") 35ICON("slideshow")
37 36
diff --git a/legacy/elementary/data/themes/Makefile.am b/legacy/elementary/data/themes/Makefile.am
index 56ac20f..dd091bb 100644
--- a/legacy/elementary/data/themes/Makefile.am
+++ b/legacy/elementary/data/themes/Makefile.am
@@ -41,7 +41,6 @@ widgets/thumb.edc \
41widgets/clock.edc \ 41widgets/clock.edc \
42widgets/icon.edc \ 42widgets/icon.edc \
43widgets/photocam.edc \ 43widgets/photocam.edc \
44widgets/toggle.edc \
45widgets/colorselector.edc \ 44widgets/colorselector.edc \
46widgets/index.edc \ 45widgets/index.edc \
47widgets/photo.edc \ 46widgets/photo.edc \
diff --git a/legacy/elementary/data/themes/default.edc b/legacy/elementary/data/themes/default.edc
index 7615b92..28824e0 100644
--- a/legacy/elementary/data/themes/default.edc
+++ b/legacy/elementary/data/themes/default.edc
@@ -322,7 +322,6 @@ collections {
322#include "widgets/scroller.edc" 322#include "widgets/scroller.edc"
323#include "widgets/label.edc" 323#include "widgets/label.edc"
324#include "widgets/button.edc" 324#include "widgets/button.edc"
325#include "widgets/toggle.edc"
326#include "widgets/clock.edc" 325#include "widgets/clock.edc"
327#include "widgets/datetime.edc" 326#include "widgets/datetime.edc"
328#include "widgets/dayselector.edc" 327#include "widgets/dayselector.edc"
diff --git a/legacy/elementary/data/themes/widgets/check.edc b/legacy/elementary/data/themes/widgets/check.edc
index 28b554a..ba63cec 100644
--- a/legacy/elementary/data/themes/widgets/check.edc
+++ b/legacy/elementary/data/themes/widgets/check.edc
@@ -247,3 +247,448 @@ group { name: "elm/check/base/default";
247 } 247 }
248 } 248 }
249} 249}
250
251group { name: "elm/check/base/toggle";
252 images {
253 image: "shelf_inset.png" COMP;
254 image: "bt_basew.png" COMP;
255 image: "bt_bases.png" COMP;
256 image: "bt_hilightw.png" COMP;
257 image: "tog_base_on.png" COMP;
258 image: "tog_base_off.png" COMP;
259 image: "tog_dis_base_on.png" COMP;
260 image: "tog_dis_base_off.png" COMP;
261 }
262 script {
263 public is_rtl;
264 }
265 parts {
266 part { name: "bg";
267 type: RECT;
268 mouse_events: 0;
269 scale: 1;
270 description { state: "default" 0.0;
271 rel1.relative: 1.0 0.0;
272 rel1.offset: -4 3;
273 rel2.offset: -4 -4;
274 align: 1.0 0.5;
275 min: 96 16;
276 max: 96 16;
277 aspect: 4.0 4.0;
278 aspect_preference: VERTICAL;
279 color: 255 255 255 255;
280 }
281 }
282 part { name: "clipper";
283 type: RECT;
284 mouse_events: 0;
285 description { state: "default" 0.0;
286 rel1.to: "bg";
287 rel2.to: "bg";
288 color: 255 255 255 255;
289 }
290 }
291 part { name: "button";
292 type: RECT;
293 scale: 1;
294 clip_to: "clipper";
295 mouse_events: 1;
296 dragable {
297 x: 1 1 0;
298 y: 0 0 0;
299 confine: "bg";
300 }
301 description { state: "default" 0.0;
302 fixed: 1 1;
303 rel1.to: "bg";
304 rel2.to: "bg";
305 min: 16 16;
306 max: 16 16;
307 aspect: 1.0 1.0;
308 aspect_preference: VERTICAL;
309 color: 0 0 0 0;
310 }
311 }
312 part { name: "button_events";
313 type: RECT;
314 dragable {
315 events: "button";
316 }
317 description { state: "default" 0.0;
318 rel1.to_x: "bg";
319 rel1.offset: 0 0;
320 rel1.relative: 0.0 0.0;
321 rel2.to_x: "bg";
322 rel2.offset: -1 -1;
323 rel2.relative: 1.0 1.0;
324 color: 0 0 0 0;
325 }
326 }
327 part { name: "onrect";
328 type: IMAGE;
329 scale: 1;
330 clip_to: "clipper";
331 mouse_events: 0;
332 description { state: "default" 0.0;
333 rel1.to: "button";
334 rel1.relative: -5.0 0.0;
335 rel2.to: "button";
336 rel2.relative: 0.5 1.0;
337 image.normal: "tog_base_on.png";
338 }
339 description { state: "disabled" 0.0;
340 inherit: "default" 0.0;
341 image.normal: "tog_dis_base_on.png";
342 }
343 }
344 part { name: "offrect";
345 type: IMAGE;
346 scale: 1;
347 clip_to: "clipper";
348 mouse_events: 0;
349 description { state: "default" 0.0;
350 rel1.to: "button";
351 rel1.relative: 0.5 0.0;
352 rel2.to: "button";
353 rel2.relative: 6.0 1.0;
354 image.normal: "tog_base_off.png";
355 }
356 description { state: "disabled" 0.0;
357 inherit: "default" 0.0;
358 image.normal: "tog_dis_base_off.png";
359 }
360 }
361 part { name: "elm.offtext";
362 type: TEXT;
363 mouse_events: 0;
364 scale: 1;
365 clip_to: "clipper";
366 description { state: "default" 0.0;
367 fixed: 1 1;
368 rel1.to_x: "button";
369 rel1.relative: 1.0 0.0;
370 rel2.to_x: "offrect";
371 color: 0 0 0 255;
372 text {
373 font: "Sans,Edje-Vera";
374 size: 10;
375 min: 0 1;
376 align: 0.5 0.5;
377 text: "OFF";
378 }
379 }
380 description { state: "disabled" 0.0;
381 inherit: "default" 0.0;
382 color: 128 128 128 128;
383 }
384 }
385 part { name: "elm.ontext";
386 type: TEXT;
387 effect: SOFT_SHADOW;
388 mouse_events: 0;
389 scale: 1;
390 clip_to: "clipper";
391 description { state: "default" 0.0;
392 fixed: 1 1;
393 rel1.to_x: "onrect";
394 rel1.offset: 1 1;
395 rel2.to_x: "button";
396 rel2.offset: 0 0;
397 rel2.relative: 0.0 1.0;
398 color: 224 224 224 255;
399 color3: 0 0 0 64;
400 text {
401 font: "Sans,Edje-Vera";
402 size: 10;
403 min: 0 1;
404 align: 0.5 0.5;
405 text: "ON";
406 }
407 }
408 description { state: "disabled" 0.0;
409 inherit: "default" 0.0;
410 color: 128 128 128 128;
411 color3: 0 0 0 24;
412 }
413 }
414 part { name: "conf_over";
415 mouse_events: 0;
416 description { state: "default" 0.0;
417 rel1.offset: -1 -1;
418 rel1.to: "bg";
419 rel2.offset: 0 0;
420 rel2.to: "bg";
421 image {
422 normal: "shelf_inset.png";
423 border: 7 7 7 7;
424 middle: 0;
425 }
426 fill.smooth : 0;
427 }
428 }
429 part { name: "button0";
430 mouse_events: 0;
431 clip_to: "clipper";
432 description { state: "default" 0.0;
433 rel1.to: "button2";
434 rel1.offset: -4 -4;
435 rel2.to: "button2";
436 rel2.offset: 3 3;
437 image {
438 normal: "bt_bases.png";
439 border: 11 11 11 11;
440 }
441 image.middle: SOLID;
442 color: 255 255 255 128;
443 }
444 }
445 part { name: "button2";
446 mouse_events: 0;
447 clip_to: "clipper";
448 description { state: "default" 0.0;
449 rel1.to: "button";
450 rel1.offset: -2 -2;
451 rel2.to: "button";
452 rel2.offset: 1 1;
453 image {
454 normal: "bt_basew.png";
455 border: 7 7 7 7;
456 }
457 image.middle: SOLID;
458 }
459 }
460 part { name: "button3";
461 mouse_events: 0;
462 clip_to: "clipper";
463 description { state: "default" 0.0;
464 rel1.to: "button2";
465 rel2.to: "button2";
466 rel2.relative: 1.0 0.5;
467 image {
468 normal: "bt_hilightw.png";
469 border: 4 4 4 0;
470 }
471 }
472 }
473 part { name: "elm.swallow.content";
474 type: SWALLOW;
475 description { state: "default" 0.0;
476 fixed: 1 0;
477 visible: 0;
478 align: 0.0 0.5;
479 rel1.offset: 4 4;
480 rel2.relative: 0.0 1.0;
481 rel2.offset: 3 -5;
482 }
483 description { state: "visible" 0.0;
484 inherit: "default" 0.0;
485 visible: 1;
486 aspect: 1.0 1.0;
487 rel2.offset: 4 -5;
488 }
489 description { state: "disabled" 0.0;
490 inherit: "default" 0.0;
491 color: 128 128 128 128;
492 }
493 description { state: "disabled_visible" 0.0;
494 inherit: "default" 0.0;
495 color: 128 128 128 128;
496 visible: 1;
497 aspect: 1.0 1.0;
498 }
499 }
500 part { name: "elm.text";
501 type: TEXT;
502 mouse_events: 0;
503 scale: 1;
504 description { state: "default" 0.0;
505 visible: 0;
506 rel1.to_x: "elm.swallow.content";
507 rel1.relative: 1.0 0.0;
508 rel1.offset: 0 4;
509 rel2.to_x: "bg";
510 rel2.relative: 0.0 1.0;
511 rel2.offset: -5 -5;
512 color: 0 0 0 255;
513 text {
514 font: "Sans,Edje-Vera";
515 size: 10;
516 min: 0 0;
517 align: 0.0 0.5;
518 }
519 }
520 description { state: "visible" 0.0;
521 inherit: "default" 0.0;
522 visible: 1;
523 text.min: 1 1;
524 }
525 description { state: "disabled" 0.0;
526 inherit: "default" 0.0;
527 color: 128 128 128 128;
528 }
529 description { state: "disabled_visible" 0.0;
530 inherit: "default" 0.0;
531 color: 128 128 128 128;
532 visible: 1;
533 text.min: 1 1;
534 }
535 }
536 part { name: "disabler";
537 type: RECT;
538 description { state: "default" 0.0;
539 color: 0 0 0 0;
540 visible: 0;
541 }
542 description { state: "disabled" 0.0;
543 inherit: "default" 0.0;
544 visible: 1;
545 }
546 }
547 }
548 programs {
549 program { name: "drag_end";
550 signal: "mouse,up,1";
551 source: "button";
552 script {
553 new Float:dx, Float:dy;
554 get_drag(PART:"button", dx, dy);
555 if (dx > 0.5)
556 {
557 set_drag(PART:"button", 1.0, 0.0);
558 }
559 else
560 {
561 set_drag(PART:"button", 0.0, 0.0);
562 }
563 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
564 (get_int(is_rtl) == 0) && (dx > 0.5)) {
565 emit("elm,action,check,on", "");
566 }
567 else {
568 emit("elm,action,check,off", "");
569 }
570
571 }
572 }
573 program { name: "check_on";
574 signal: "elm,state,check,on";
575 source: "elm";
576 script {
577 new Float:drag;
578 if (get_int(is_rtl) == 0) {
579 drag = 100.0;
580 }
581 else {
582 drag = 0.0;
583 }
584 set_drag(PART:"button", drag, 0.0);
585 }
586 }
587 program { name: "check_off";
588 signal: "elm,state,check,off";
589 source: "elm";
590 script {
591 new Float:drag;
592 if (get_int(is_rtl) == 0) {
593 drag = 0.0;
594 }
595 else {
596 drag = 100.0;
597 }
598 set_drag(PART:"button", drag, 0.0);
599 }
600 }
601 program { name: "text_show";
602 signal: "elm,state,text,visible";
603 source: "elm";
604 action: STATE_SET "visible" 0.0;
605 target: "elm.text";
606 }
607 program { name: "text_hide";
608 signal: "elm,state,text,hidden";
609 source: "elm";
610 action: STATE_SET "default" 0.0;
611 target: "elm.text";
612 }
613 program { name: "icon_show";
614 signal: "elm,state,icon,visible";
615 source: "elm";
616 action: STATE_SET "visible" 0.0;
617 target: "elm.swallow.content";
618 }
619 program { name: "icon_hide";
620 signal: "elm,state,icon,hidden";
621 source: "elm";
622 action: STATE_SET "default" 0.0;
623 target: "elm.swallow.content";
624 }
625 program { name: "disable";
626 signal: "elm,state,disabled";
627 source: "elm";
628 action: STATE_SET "disabled" 0.0;
629 target: "elm.offtext";
630 target: "elm.ontext";
631 target: "onrect";
632 target: "offrect";
633 target: "disabler";
634 after: "disable_text";
635 }
636 program { name: "disable_text";
637 script {
638 new st[31];
639 new Float:vl;
640 get_state(PART:"elm.text", st, 30, vl);
641 if (!strcmp(st, "visible"))
642 set_state(PART:"elm.text", "disabled_visible", 0.0);
643 else
644 set_state(PART:"elm.text", "disabled", 0.0);
645
646 get_state(PART:"elm.swallow.content", st, 30, vl);
647 if (!strcmp(st, "visible"))
648 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
649 else
650 set_state(PART:"elm.swallow.content", "disabled", 0.0);
651 }
652 }
653 program { name: "enable";
654 signal: "elm,state,enabled";
655 source: "elm";
656 action: STATE_SET "default" 0.0;
657 target: "disabler";
658 target: "onrect";
659 target: "offrect";
660 after: "enable_text";
661 }
662 program { name: "enable_text";
663 script {
664 new st[31];
665 new Float:vl;
666 get_state(PART:"elm.text", st, 30, vl);
667 if (!strcmp(st, "disabled_visible"))
668 set_state(PART:"elm.text", "visible", 0.0);
669 else
670 set_state(PART:"elm.text", "default", 0.0);
671
672 get_state(PART:"elm.swallow.content", st, 30, vl);
673 if (!strcmp(st, "visible"))
674 set_state(PART:"elm.swallow.content", "visible", 0.0);
675 else
676 set_state(PART:"elm.swallow.content", "default", 0.0);
677 }
678 }
679 program { name: "to_rtl";
680 signal: "edje,state,rtl";
681 source: "edje";
682 script {
683 set_int(is_rtl, 1);
684 }
685 }
686 program { name: "to_ltr";
687 signal: "edje,state,ltr";
688 source: "edje";
689 script {
690 set_int(is_rtl, 0);
691 }
692 }
693 }
694}
diff --git a/legacy/elementary/data/themes/widgets/toggle.edc b/legacy/elementary/data/themes/widgets/toggle.edc
deleted file mode 100644
index 8194d54..0000000
--- a/legacy/elementary/data/themes/widgets/toggle.edc
+++ /dev/null
@@ -1,444 +0,0 @@
1group { name: "elm/check/base/toggle";
2 images {
3 image: "shelf_inset.png" COMP;
4 image: "bt_basew.png" COMP;
5 image: "bt_bases.png" COMP;
6 image: "bt_hilightw.png" COMP;
7 image: "tog_base_on.png" COMP;
8 image: "tog_base_off.png" COMP;
9 image: "tog_dis_base_on.png" COMP;
10 image: "tog_dis_base_off.png" COMP;
11 }
12 script {
13 public is_rtl;
14 }
15 parts {
16 part { name: "bg";
17 type: RECT;
18 mouse_events: 0;
19 scale: 1;
20 description { state: "default" 0.0;
21 rel1.relative: 1.0 0.0;
22 rel1.offset: -4 3;
23 rel2.offset: -4 -4;
24 align: 1.0 0.5;
25 min: 96 16;
26 max: 96 16;
27 aspect: 4.0 4.0;
28 aspect_preference: VERTICAL;
29 color: 255 255 255 255;
30 }
31 }
32 part { name: "clipper";
33 type: RECT;
34 mouse_events: 0;
35 description { state: "default" 0.0;
36 rel1.to: "bg";
37 rel2.to: "bg";
38 color: 255 255 255 255;
39 }
40 }
41 part { name: "button";
42 type: RECT;
43 scale: 1;
44 clip_to: "clipper";
45 mouse_events: 1;
46 dragable {
47 x: 1 1 0;
48 y: 0 0 0;
49 confine: "bg";
50 }
51 description { state: "default" 0.0;
52 fixed: 1 1;
53 rel1.to: "bg";
54 rel2.to: "bg";
55 min: 16 16;
56 max: 16 16;
57 aspect: 1.0 1.0;
58 aspect_preference: VERTICAL;
59 color: 0 0 0 0;
60 }
61 }
62 part { name: "button_events";
63 type: RECT;
64 dragable {
65 events: "button";
66 }
67 description { state: "default" 0.0;
68 rel1.to_x: "bg";
69 rel1.offset: 0 0;
70 rel1.relative: 0.0 0.0;
71 rel2.to_x: "bg";
72 rel2.offset: -1 -1;
73 rel2.relative: 1.0 1.0;
74 color: 0 0 0 0;
75 }
76 }
77 part { name: "onrect";
78 type: IMAGE;
79 scale: 1;
80 clip_to: "clipper";
81 mouse_events: 0;
82 description { state: "default" 0.0;
83 rel1.to: "button";
84 rel1.relative: -5.0 0.0;
85 rel2.to: "button";
86 rel2.relative: 0.5 1.0;
87 image.normal: "tog_base_on.png";
88 }
89 description { state: "disabled" 0.0;
90 inherit: "default" 0.0;
91 image.normal: "tog_dis_base_on.png";
92 }
93 }
94 part { name: "offrect";
95 type: IMAGE;
96 scale: 1;
97 clip_to: "clipper";
98 mouse_events: 0;
99 description { state: "default" 0.0;
100 rel1.to: "button";
101 rel1.relative: 0.5 0.0;
102 rel2.to: "button";
103 rel2.relative: 6.0 1.0;
104 image.normal: "tog_base_off.png";
105 }
106 description { state: "disabled" 0.0;
107 inherit: "default" 0.0;
108 image.normal: "tog_dis_base_off.png";
109 }
110 }
111 part { name: "elm.offtext";
112 type: TEXT;
113 mouse_events: 0;
114 scale: 1;
115 clip_to: "clipper";
116 description { state: "default" 0.0;
117 fixed: 1 1;
118 rel1.to_x: "button";
119 rel1.relative: 1.0 0.0;
120 rel2.to_x: "offrect";
121 color: 0 0 0 255;
122 text {
123 font: "Sans,Edje-Vera";
124 size: 10;
125 min: 0 1;
126 align: 0.5 0.5;
127 text: "OFF";
128 }
129 }
130 description { state: "disabled" 0.0;
131 inherit: "default" 0.0;
132 color: 128 128 128 128;
133 }
134 }
135 part { name: "elm.ontext";
136 type: TEXT;
137 effect: SOFT_SHADOW;
138 mouse_events: 0;
139 scale: 1;
140 clip_to: "clipper";
141 description { state: "default" 0.0;
142 fixed: 1 1;
143 rel1.to_x: "onrect";
144 rel1.offset: 1 1;
145 rel2.to_x: "button";
146 rel2.offset: 0 0;
147 rel2.relative: 0.0 1.0;
148 color: 224 224 224 255;
149 color3: 0 0 0 64;
150 text {
151 font: "Sans,Edje-Vera";
152 size: 10;
153 min: 0 1;
154 align: 0.5 0.5;
155 text: "ON";
156 }
157 }
158 description { state: "disabled" 0.0;
159 inherit: "default" 0.0;
160 color: 128 128 128 128;
161 color3: 0 0 0 24;
162 }
163 }
164 part { name: "conf_over";
165 mouse_events: 0;
166 description { state: "default" 0.0;
167 rel1.offset: -1 -1;
168 rel1.to: "bg";
169 rel2.offset: 0 0;
170 rel2.to: "bg";
171 image {
172 normal: "shelf_inset.png";
173 border: 7 7 7 7;
174 middle: 0;
175 }
176 fill.smooth : 0;
177 }
178 }
179 part { name: "button0";
180 mouse_events: 0;
181 clip_to: "clipper";
182 description { state: "default" 0.0;
183 rel1.to: "button2";
184 rel1.offset: -4 -4;
185 rel2.to: "button2";
186 rel2.offset: 3 3;
187 image {
188 normal: "bt_bases.png";
189 border: 11 11 11 11;
190 }
191 image.middle: SOLID;
192 color: 255 255 255 128;
193 }
194 }
195 part { name: "button2";
196 mouse_events: 0;
197 clip_to: "clipper";
198 description { state: "default" 0.0;
199 rel1.to: "button";
200 rel1.offset: -2 -2;
201 rel2.to: "button";
202 rel2.offset: 1 1;
203 image {
204 normal: "bt_basew.png";
205 border: 7 7 7 7;
206 }
207 image.middle: SOLID;
208 }
209 }
210 part { name: "button3";
211 mouse_events: 0;
212 clip_to: "clipper";
213 description { state: "default" 0.0;
214 rel1.to: "button2";
215 rel2.to: "button2";
216 rel2.relative: 1.0 0.5;
217 image {
218 normal: "bt_hilightw.png";
219 border: 4 4 4 0;
220 }
221 }
222 }
223 part { name: "elm.swallow.content";
224 type: SWALLOW;
225 description { state: "default" 0.0;
226 fixed: 1 0;
227 visible: 0;
228 align: 0.0 0.5;
229 rel1.offset: 4 4;
230 rel2.relative: 0.0 1.0;
231 rel2.offset: 3 -5;
232 }
233 description { state: "visible" 0.0;
234 inherit: "default" 0.0;
235 visible: 1;
236 aspect: 1.0 1.0;
237 rel2.offset: 4 -5;
238 }
239 description { state: "disabled" 0.0;
240 inherit: "default" 0.0;
241 color: 128 128 128 128;
242 }
243 description { state: "disabled_visible" 0.0;
244 inherit: "default" 0.0;
245 color: 128 128 128 128;
246 visible: 1;
247 aspect: 1.0 1.0;
248 }
249 }
250 part { name: "elm.text";
251 type: TEXT;
252 mouse_events: 0;
253 scale: 1;
254 description { state: "default" 0.0;
255 visible: 0;
256 rel1.to_x: "elm.swallow.content";
257 rel1.relative: 1.0 0.0;
258 rel1.offset: 0 4;
259 rel2.to_x: "bg";
260 rel2.relative: 0.0 1.0;
261 rel2.offset: -5 -5;
262 color: 0 0 0 255;
263 text {
264 font: "Sans,Edje-Vera";
265 size: 10;
266 min: 0 0;
267 align: 0.0 0.5;
268 }
269 }
270 description { state: "visible" 0.0;
271 inherit: "default" 0.0;
272 visible: 1;
273 text.min: 1 1;
274 }
275 description { state: "disabled" 0.0;
276 inherit: "default" 0.0;
277 color: 128 128 128 128;
278 }
279 description { state: "disabled_visible" 0.0;
280 inherit: "default" 0.0;
281 color: 128 128 128 128;
282 visible: 1;
283 text.min: 1 1;
284 }
285 }
286 part { name: "disabler";
287 type: RECT;
288 description { state: "default" 0.0;
289 color: 0 0 0 0;
290 visible: 0;
291 }
292 description { state: "disabled" 0.0;
293 inherit: "default" 0.0;
294 visible: 1;
295 }
296 }
297 }
298 programs {
299 program { name: "drag_end";
300 signal: "mouse,up,1";
301 source: "button";
302 script {
303 new Float:dx, Float:dy;
304 get_drag(PART:"button", dx, dy);
305 if (dx > 0.5)
306 {
307 set_drag(PART:"button", 1.0, 0.0);
308 }
309 else
310 {
311 set_drag(PART:"button", 0.0, 0.0);
312 }
313 if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
314 (get_int(is_rtl) == 0) && (dx > 0.5)) {
315 emit("elm,action,check,on", "");
316 }
317 else {
318 emit("elm,action,check,off", "");
319 }
320
321 }
322 }
323 program { name: "check_on";
324 signal: "elm,state,check,on";
325 source: "elm";
326 script {
327 new Float:drag;
328 if (get_int(is_rtl) == 0) {
329 drag = 100.0;
330 }
331 else {
332 drag = 0.0;
333 }
334 set_drag(PART:"button", drag, 0.0);
335 }
336 }
337 program { name: "check_off";
338 signal: "elm,state,check,off";
339 source: "elm";
340 script {
341 new Float:drag;
342 if (get_int(is_rtl) == 0) {
343 drag = 0.0;
344 }
345 else {
346 drag = 100.0;
347 }
348 set_drag(PART:"button", drag, 0.0);
349 }
350 }
351 program { name: "text_show";
352 signal: "elm,state,text,visible";
353 source: "elm";
354 action: STATE_SET "visible" 0.0;
355 target: "elm.text";
356 }
357 program { name: "text_hide";
358 signal: "elm,state,text,hidden";
359 source: "elm";
360 action: STATE_SET "default" 0.0;
361 target: "elm.text";
362 }
363 program { name: "icon_show";
364 signal: "elm,state,icon,visible";
365 source: "elm";
366 action: STATE_SET "visible" 0.0;
367 target: "elm.swallow.content";
368 }
369 program { name: "icon_hide";
370 signal: "elm,state,icon,hidden";
371 source: "elm";
372 action: STATE_SET "default" 0.0;
373 target: "elm.swallow.content";
374 }
375 program { name: "disable";
376 signal: "elm,state,disabled";
377 source: "elm";
378 action: STATE_SET "disabled" 0.0;
379 target: "elm.offtext";
380 target: "elm.ontext";
381 target: "onrect";
382 target: "offrect";
383 target: "disabler";
384 after: "disable_text";
385 }
386 program { name: "disable_text";
387 script {
388 new st[31];
389 new Float:vl;
390 get_state(PART:"elm.text", st, 30, vl);
391 if (!strcmp(st, "visible"))
392 set_state(PART:"elm.text", "disabled_visible", 0.0);
393 else
394 set_state(PART:"elm.text", "disabled", 0.0);
395
396 get_state(PART:"elm.swallow.content", st, 30, vl);
397 if (!strcmp(st, "visible"))
398 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
399 else
400 set_state(PART:"elm.swallow.content", "disabled", 0.0);
401 }
402 }
403 program { name: "enable";
404 signal: "elm,state,enabled";
405 source: "elm";
406 action: STATE_SET "default" 0.0;
407 target: "disabler";
408 target: "onrect";
409 target: "offrect";
410 after: "enable_text";
411 }
412 program { name: "enable_text";
413 script {
414 new st[31];
415 new Float:vl;
416 get_state(PART:"elm.text", st, 30, vl);
417 if (!strcmp(st, "disabled_visible"))
418 set_state(PART:"elm.text", "visible", 0.0);
419 else
420 set_state(PART:"elm.text", "default", 0.0);
421
422 get_state(PART:"elm.swallow.content", st, 30, vl);
423 if (!strcmp(st, "visible"))
424 set_state(PART:"elm.swallow.content", "visible", 0.0);
425 else
426 set_state(PART:"elm.swallow.content", "default", 0.0);
427 }
428 }
429 program { name: "to_rtl";
430 signal: "edje,state,rtl";
431 source: "edje";
432 script {
433 set_int(is_rtl, 1);
434 }
435 }
436 program { name: "to_ltr";
437 signal: "edje,state,ltr";
438 source: "edje";
439 script {
440 set_int(is_rtl, 0);
441 }
442 }
443 }
444}