summaryrefslogtreecommitdiff
path: root/data/elementary/themes
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-12-28 20:36:52 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-12-28 20:39:08 +0000
commitf989cea52ddcff188bfab56a4cf5b29612d7ebaf (patch)
tree1f9282258bb4be733f968e5c0acc5da3f3b94090 /data/elementary/themes
parent2e854ce7ed5a75249ceb7201411ccb2b83e27a4d (diff)
elm - add plain and icon style radio and check and elm tests for it
this will be common enough to put into elm - there is no way to do a gimp style "tool palette" where you select one of them (like one from a set of radio buttons) at all times... but you don't want the "round circle" but instead want it to look more like a button to fit in with a palette style look. this calls for styles... so here they are. @feat
Diffstat (limited to 'data/elementary/themes')
-rw-r--r--data/elementary/themes/edc/elm/radio.edc643
1 files changed, 643 insertions, 0 deletions
diff --git a/data/elementary/themes/edc/elm/radio.edc b/data/elementary/themes/edc/elm/radio.edc
index 6d137b8a17..71d538e0b5 100644
--- a/data/elementary/themes/edc/elm/radio.edc
+++ b/data/elementary/themes/edc/elm/radio.edc
@@ -288,3 +288,646 @@ group { name: "elm/radio/base/default";
288#undef MASK 288#undef MASK
289#undef DISABLE 289#undef DISABLE
290} 290}
291
292group { name: "elm/radio/base/plain";
293 alias: "elm/check/base/plain";
294 images.image: "button_normal.png" COMP;
295 images.image: "button_clicked.png" COMP;
296 images.image: "horizontal_separated_bar_small_glow.png" COMP;
297#define ICON 1
298#define LABEL 2
299#define MASK 3
300#define DISABLE 4
301#define SELECTED 8
302 script {
303 public btmode;
304 public eval_mode(m) {
305 new m1 = m & MASK;
306 new d = m & DISABLE;
307 new s = m & SELECTED;
308 if (s) {
309 set_state(PART:"base", "selected", 0.0);
310 set_state(PART:"bar", "selected", 0.0);
311 } else {
312 set_state(PART:"base", "default", 0.0);
313 set_state(PART:"bar", "default", 0.0);
314 }
315 if (m1 == (ICON | LABEL)) {
316 if (!d) {
317 set_state(PART:"elm.swallow.content", "visible", 0.0);
318 set_state(PART:"sizer_content", "visible", 0.0);
319 set_state(PART:"elm.text", "visible", 0.0);
320 set_state(PART:"clip", "default", 0.0);
321 set_state(PART:"event", "default", 0.0);
322 } else {
323 set_state(PART:"elm.swallow.content", "visible", 0.0);
324 set_state(PART:"sizer_content", "visible", 0.0);
325 set_state(PART:"elm.text", "disabled_visible", 0.0);
326 set_state(PART:"clip", "disabled", 0.0);
327 set_state(PART:"event", "disabled", 0.0);
328 }
329 } else if (m1 == (ICON)) {
330 if (!d) {
331 set_state(PART:"elm.swallow.content", "icononly", 0.0);
332 set_state(PART:"sizer_content", "icononly", 0.0);
333 set_state(PART:"elm.text", "default", 0.0);
334 set_state(PART:"clip", "default", 0.0);
335 set_state(PART:"event", "default", 0.0);
336 } else {
337 set_state(PART:"elm.swallow.content", "icononly", 0.0);
338 set_state(PART:"sizer_content", "icononly", 0.0);
339 set_state(PART:"elm.text", "disabled", 0.0);
340 set_state(PART:"base", "disabled", 0.0);
341 set_state(PART:"clip", "disabled", 0.0);
342 set_state(PART:"event", "disabled", 0.0);
343 }
344 } else if (m1 == (LABEL)) {
345 if (!d) {
346 set_state(PART:"elm.swallow.content", "default", 0.0);
347 set_state(PART:"sizer_content", "default", 0.0);
348 set_state(PART:"elm.text", "visible", 0.0);
349 set_state(PART:"clip", "default", 0.0);
350 set_state(PART:"event", "default", 0.0);
351 } else {
352 set_state(PART:"elm.swallow.content", "default", 0.0);
353 set_state(PART:"sizer_content", "default", 0.0);
354 set_state(PART:"elm.text", "disabled_visible", 0.0);
355 set_state(PART:"clip", "disabled", 0.0);
356 set_state(PART:"event", "disabled", 0.0);
357 }
358 } else {
359 if (!d) {
360 set_state(PART:"elm.swallow.content", "default", 0.0);
361 set_state(PART:"sizer_content", "default", 0.0);
362 set_state(PART:"elm.text", "default", 0.0);
363 set_state(PART:"clip", "default", 0.0);
364 set_state(PART:"event", "default", 0.0);
365 } else {
366 set_state(PART:"elm.swallow.content", "default", 0.0);
367 set_state(PART:"sizer_content", "default", 0.0);
368 set_state(PART:"elm.text", "default", 0.0);
369 set_state(PART:"clip", "disabled", 0.0);
370 set_state(PART:"event", "disabled", 0.0);
371 }
372 }
373 }
374 }
375 parts {
376 part { name: "base"; mouse_events: 0;
377 description { state: "default" 0.0;
378 rel1.offset: -1 0;
379 rel2.offset: 0 1;
380 image.normal: "button_normal.png";
381 image.border: 4 4 3 5;
382 image.middle: SOLID;
383 fill.smooth: 0;
384 }
385 description { state: "selected" 0.0;
386 inherit: "default" 0.0;
387 image.normal: "button_clicked.png";
388 image.border: 5 5 4 6;
389 }
390 description { state: "disabled" 0.0;
391 inherit: "default" 0.0;
392 }
393 }
394 part { name: "clip"; type: RECT;
395 description { state: "default" 0.0;
396 }
397 description { state: "disabled" 0.0;
398 inherit: "default" 0.0;
399 color: 255 255 255 64;
400 }
401 }
402 part { name: "elm.swallow.content"; type: SWALLOW;
403 scale: 1;
404 clip_to: "clip";
405 description { state: "default" 0.0;
406 fixed: 1 0;
407 visible: 0;
408 align: 0.0 0.5;
409 max: 0 0;
410 rel1.offset: 6 5;
411 rel1.to: "base";
412 rel2.relative: 0.0 1.0;
413 rel2.offset: 6 -8;
414 rel2.to: "base";
415 }
416 description { state: "icononly" 0.0;
417 inherit: "default" 0.0;
418 visible: 1;
419 align: 0.5 0.5;
420 max: 9999 9999;
421 min: 16 16;
422 rel2.relative: 1.0 1.0;
423 rel2.offset: -7 -8;
424 }
425 description { state: "visible" 0.0;
426 inherit: "default" 0.0;
427 visible: 1;
428 aspect: 1.0 1.0;
429 max: 9999 9999;
430 min: 16 16;
431 }
432 }
433 part { name: "sizer_content"; type: TEXT; mouse_events: 0;
434 scale: 1;
435 description { state: "default" 0.0;
436 fixed: 1 1;
437 visible: 0;
438 text { font: FN; size: 10;
439 min: 0 0;
440 text_class: "radio_text";
441 }
442 }
443 description { state: "visible" 0.0;
444 inherit: "default" 0.0;
445 rel1.to: "elm.swallow.content";
446 rel2.to: "elm.swallow.content";
447 text {
448 min: 1 1;
449 ellipsis: -1;
450 text: "M";
451 }
452 }
453 description { state: "icononly" 0.0;
454 inherit: "default" 0.0;
455 rel1.to: "elm.swallow.content";
456 rel2.to: "elm.swallow.content";
457 text {
458 min: 1 1;
459 ellipsis: -1;
460 text: "M";
461 }
462 }
463 }
464 part { name: "elm.text"; type: TEXT; mouse_events: 0;
465 effect: SHADOW BOTTOM;
466 scale: 1;
467 description { state: "default" 0.0;
468 rel1.offset: 2 4;
469 rel1.to_x: "elm.swallow.content";
470 rel1.relative: 1.0 0.0;
471 rel1.to_y: "base";
472 rel2.offset: -8 -8;
473 rel2.to: "base";
474 color: FN_COL_DEFAULT;
475 color_class: "radio_text";
476 text { font: FN; size: 10;
477 min: 0 0;
478 align: 0.0 0.5;
479 text_class: "radio";
480 }
481 }
482 description { state: "disabled" 0.0;
483 inherit: "default" 0.0;
484 color_class: "radio_text_disabled";
485 color3: 255 255 255 255;
486 }
487 description { state: "visible" 0.0;
488 inherit: "default" 0.0;
489 visible: 1;
490 text.min: 1 1;
491 text.ellipsis: -1;
492 }
493 description { state: "disabled_visible" 0.0;
494 inherit: "default" 0.0;
495 color_class: "radio_text_disabled";
496 color3: 255 255 255 255;
497 visible: 1;
498 text.min: 1 1;
499 text.ellipsis: -1;
500 }
501 }
502 image { "bar"; nomouse;
503 desc { "default";
504 image.normal: "horizontal_separated_bar_small_glow.png";
505 image.border: 4 4 4 4;
506 fill.smooth: 0;
507 fill.smooth: 0;
508 fixed: 0 1;
509 rel.to: "base";
510 rel1.relative: 0.0 1.0;
511 rel1.offset: 1 -12;
512 rel2.offset: -2 -3;
513 color: 255 255 255 0;
514 visible: 0;
515 }
516 desc { "selected";
517 inherit: "default";
518 color: 255 255 255 255;
519 visible: 1;
520 }
521 }
522 part { name: "event"; type: RECT;
523 description { state: "default" 0.0;
524 color: 0 0 0 0;
525 }
526 description { state: "disabled" 0.0;
527 inherit: "default" 0.0;
528 visible: 0;
529 }
530 }
531 }
532 programs {
533 program { signal: "mouse,down,1"; source: "event";
534 action: STATE_SET "selected" 0.0;
535 target: "base";
536 }
537 program { signal: "mouse,up,1"; source: "event";
538 script {
539 new m = get_int(btmode);
540 eval_mode(m);
541 }
542 }
543 program { signal: "mouse,clicked,1"; source: "event";
544 action: SIGNAL_EMIT "elm,action,radio,toggle" "elm";
545 }
546 program { signal: "mouse,clicked,1"; source: "event";
547 action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
548 }
549 program { signal: "elm,state,*,on"; source: "elm";
550 script {
551 new m = get_int(btmode);
552 m |= SELECTED; set_int(btmode, m);
553 eval_mode(m);
554 }
555 }
556 program { signal: "elm,state,*,off"; source: "elm";
557 script {
558 new m = get_int(btmode);
559 m &= ~SELECTED; set_int(btmode, m);
560 eval_mode(m);
561 }
562 }
563 program { signal: "elm,state,text,visible"; source: "elm";
564 script {
565 new m = get_int(btmode);
566 m |= LABEL; set_int(btmode, m);
567 eval_mode(m);
568 }
569 }
570 program { signal: "elm,state,text,hidden"; source: "elm";
571 script {
572 new m = get_int(btmode);
573 m &= ~LABEL; set_int(btmode, m);
574 eval_mode(m);
575 }
576 }
577 program { signal: "elm,state,icon,visible"; source: "elm";
578 script {
579 new m = get_int(btmode);
580 m |= ICON; set_int(btmode, m);
581 eval_mode(m);
582 }
583 }
584 program { signal: "elm,state,icon,hidden"; source: "elm";
585 script {
586 new m = get_int(btmode);
587 m &= ~ICON; set_int(btmode, m);
588 eval_mode(m);
589 }
590 }
591 program { signal: "elm,state,disabled"; source: "elm";
592 script {
593 new m = get_int(btmode);
594 m |= DISABLE; set_int(btmode, m);
595 eval_mode(m);
596 }
597 }
598 program { signal: "elm,state,enabled"; source: "elm";
599 script {
600 new m = get_int(btmode);
601 m &= ~DISABLE; set_int(btmode, m);
602 eval_mode(m);
603 }
604 }
605 }
606#undef ICON
607#undef LABEL
608#undef MASK
609#undef DISABLE
610}
611
612group { name: "elm/radio/base/icon";
613 alias: "elm/check/base/icon";
614 images.image: "button_normal.png" COMP;
615 images.image: "button_clicked.png" COMP;
616 images.image: "horizontal_separated_bar_small_glow.png" COMP;
617#define ICON 1
618#define LABEL 2
619#define MASK 3
620#define DISABLE 4
621#define SELECTED 8
622 script {
623 public btmode;
624 public eval_mode(m) {
625 new m1 = m & MASK;
626 new d = m & DISABLE;
627 new s = m & SELECTED;
628 if (s) {
629 set_state(PART:"base", "selected", 0.0);
630 set_state(PART:"bar", "selected", 0.0);
631 } else {
632 set_state(PART:"base", "default", 0.0);
633 set_state(PART:"bar", "default", 0.0);
634 }
635 if (m1 == (ICON | LABEL)) {
636 if (!d) {
637 set_state(PART:"elm.swallow.content", "visible", 0.0);
638 set_state(PART:"sizer_content", "visible", 0.0);
639 set_state(PART:"elm.text", "visible", 0.0);
640 set_state(PART:"clip", "default", 0.0);
641 set_state(PART:"event", "default", 0.0);
642 } else {
643 set_state(PART:"elm.swallow.content", "visible", 0.0);
644 set_state(PART:"sizer_content", "visible", 0.0);
645 set_state(PART:"elm.text", "disabled_visible", 0.0);
646 set_state(PART:"clip", "disabled", 0.0);
647 set_state(PART:"event", "disabled", 0.0);
648 }
649 } else if (m1 == (ICON)) {
650 if (!d) {
651 set_state(PART:"elm.swallow.content", "icononly", 0.0);
652 set_state(PART:"sizer_content", "icononly", 0.0);
653 set_state(PART:"elm.text", "default", 0.0);
654 set_state(PART:"clip", "default", 0.0);
655 set_state(PART:"event", "default", 0.0);
656 } else {
657 set_state(PART:"elm.swallow.content", "icononly", 0.0);
658 set_state(PART:"sizer_content", "icononly", 0.0);
659 set_state(PART:"elm.text", "disabled", 0.0);
660 set_state(PART:"base", "disabled", 0.0);
661 set_state(PART:"clip", "disabled", 0.0);
662 set_state(PART:"event", "disabled", 0.0);
663 }
664 } else if (m1 == (LABEL)) {
665 if (!d) {
666 set_state(PART:"elm.swallow.content", "default", 0.0);
667 set_state(PART:"sizer_content", "default", 0.0);
668 set_state(PART:"elm.text", "visible", 0.0);
669 set_state(PART:"clip", "default", 0.0);
670 set_state(PART:"event", "default", 0.0);
671 } else {
672 set_state(PART:"elm.swallow.content", "default", 0.0);
673 set_state(PART:"sizer_content", "default", 0.0);
674 set_state(PART:"elm.text", "disabled_visible", 0.0);
675 set_state(PART:"clip", "disabled", 0.0);
676 set_state(PART:"event", "disabled", 0.0);
677 }
678 } else {
679 if (!d) {
680 set_state(PART:"elm.swallow.content", "default", 0.0);
681 set_state(PART:"sizer_content", "default", 0.0);
682 set_state(PART:"elm.text", "default", 0.0);
683 set_state(PART:"clip", "default", 0.0);
684 set_state(PART:"event", "default", 0.0);
685 } else {
686 set_state(PART:"elm.swallow.content", "default", 0.0);
687 set_state(PART:"sizer_content", "default", 0.0);
688 set_state(PART:"elm.text", "default", 0.0);
689 set_state(PART:"clip", "disabled", 0.0);
690 set_state(PART:"event", "disabled", 0.0);
691 }
692 }
693 }
694 }
695 parts {
696 part { name: "base"; mouse_events: 0;
697 description { state: "default" 0.0;
698 rel1.offset: -1 0;
699 rel2.offset: 0 1;
700 image.normal: "button_normal.png";
701 image.border: 4 4 3 5;
702 image.middle: SOLID;
703 fill.smooth: 0;
704 }
705 description { state: "selected" 0.0;
706 inherit: "default" 0.0;
707 image.normal: "button_clicked.png";
708 image.border: 5 5 4 6;
709 }
710 description { state: "disabled" 0.0;
711 inherit: "default" 0.0;
712 }
713 }
714 part { name: "clip"; type: RECT;
715 description { state: "default" 0.0;
716 }
717 description { state: "disabled" 0.0;
718 inherit: "default" 0.0;
719 color: 255 255 255 64;
720 }
721 }
722 part { name: "elm.swallow.content"; type: SWALLOW;
723 scale: 1;
724 clip_to: "clip";
725 description { state: "default" 0.0;
726 fixed: 0 1;
727 visible: 0;
728 align: 0.5 0.0;
729 max: 0 0;
730 rel1.offset: 6 2;
731 rel1.to: "base";
732 rel2.relative: 1.0 0.0;
733 rel2.offset: -7 2;
734 rel2.to: "base";
735 }
736 description { state: "icononly" 0.0;
737 inherit: "default" 0.0;
738 fixed: 0 0;
739 visible: 1;
740 align: 0.5 0.5;
741 max: 9999 9999;
742 min: 16 16;
743 rel2.relative: 1.0 1.0;
744 rel2.offset: -7 -8;
745 }
746 description { state: "visible" 0.0;
747 inherit: "default" 0.0;
748 fixed: 0 0;
749 visible: 1;
750 rel1.offset: 6 5;
751 rel2.offset: -7 5;
752 aspect: 1.0 1.0;
753 max: 9999 9999;
754 min: 16 16;
755 }
756 }
757 part { name: "sizer_content"; type: TEXT; mouse_events: 0;
758 scale: 1;
759 description { state: "default" 0.0;
760 fixed: 1 1;
761 visible: 0;
762 text { font: FN; size: 10;
763 min: 0 0;
764 text_class: "radio_text";
765 }
766 }
767 description { state: "visible" 0.0;
768 inherit: "default" 0.0;
769 rel1.to: "elm.swallow.content";
770 rel2.to: "elm.swallow.content";
771 text {
772 min: 1 1;
773 ellipsis: -1;
774 text: "M";
775 }
776 }
777 description { state: "icononly" 0.0;
778 inherit: "default" 0.0;
779 rel1.to: "elm.swallow.content";
780 rel2.to: "elm.swallow.content";
781 text {
782 min: 1 1;
783 ellipsis: -1;
784 text: "M";
785 }
786 }
787 }
788 part { name: "elm.text"; type: TEXT; mouse_events: 0;
789 effect: SHADOW BOTTOM;
790 scale: 1;
791 description { state: "default" 0.0;
792 rel1.offset: 6 2;
793 rel1.to_y: "elm.swallow.content";
794 rel1.relative: 0.0 1.0;
795 rel2.offset: -8 -8;
796 rel2.to: "base";
797 color: FN_COL_DEFAULT;
798 color_class: "radio_text";
799 text { font: FN; size: 10;
800 min: 0 0;
801 align: 0.5 1.0;
802 text_class: "radio";
803 }
804 }
805 description { state: "disabled" 0.0;
806 inherit: "default" 0.0;
807 color_class: "radio_text_disabled";
808 color3: 255 255 255 255;
809 }
810 description { state: "visible" 0.0;
811 inherit: "default" 0.0;
812 visible: 1;
813 text.min: 1 1;
814 text.ellipsis: -1;
815 }
816 description { state: "disabled_visible" 0.0;
817 inherit: "default" 0.0;
818 color_class: "radio_text_disabled";
819 color3: 255 255 255 255;
820 visible: 1;
821 text.min: 1 1;
822 text.ellipsis: -1;
823 }
824 }
825 image { "bar"; nomouse;
826 desc { "default";
827 image.normal: "horizontal_separated_bar_small_glow.png";
828 image.border: 4 4 4 4;
829 fill.smooth: 0;
830 fill.smooth: 0;
831 fixed: 0 1;
832 rel.to: "base";
833 rel1.relative: 0.0 1.0;
834 rel1.offset: 1 -12;
835 rel2.offset: -2 -3;
836 color: 255 255 255 0;
837 visible: 0;
838 }
839 desc { "selected";
840 inherit: "default";
841 color: 255 255 255 255;
842 visible: 1;
843 }
844 }
845 part { name: "event"; type: RECT;
846 description { state: "default" 0.0;
847 color: 0 0 0 0;
848 }
849 description { state: "disabled" 0.0;
850 inherit: "default" 0.0;
851 visible: 0;
852 }
853 }
854 }
855 programs {
856 program { signal: "mouse,down,1"; source: "event";
857 action: STATE_SET "selected" 0.0;
858 target: "base";
859 }
860 program { signal: "mouse,up,1"; source: "event";
861 script {
862 new m = get_int(btmode);
863 eval_mode(m);
864 }
865 }
866 program { signal: "mouse,clicked,1"; source: "event";
867 action: SIGNAL_EMIT "elm,action,radio,toggle" "elm";
868 }
869 program { signal: "mouse,clicked,1"; source: "event";
870 action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
871 }
872 program { signal: "elm,state,*,on"; source: "elm";
873 script {
874 new m = get_int(btmode);
875 m |= SELECTED; set_int(btmode, m);
876 eval_mode(m);
877 }
878 }
879 program { signal: "elm,state,*,off"; source: "elm";
880 script {
881 new m = get_int(btmode);
882 m &= ~SELECTED; set_int(btmode, m);
883 eval_mode(m);
884 }
885 }
886 program { signal: "elm,state,text,visible"; source: "elm";
887 script {
888 new m = get_int(btmode);
889 m |= LABEL; set_int(btmode, m);
890 eval_mode(m);
891 }
892 }
893 program { signal: "elm,state,text,hidden"; source: "elm";
894 script {
895 new m = get_int(btmode);
896 m &= ~LABEL; set_int(btmode, m);
897 eval_mode(m);
898 }
899 }
900 program { signal: "elm,state,icon,visible"; source: "elm";
901 script {
902 new m = get_int(btmode);
903 m |= ICON; set_int(btmode, m);
904 eval_mode(m);
905 }
906 }
907 program { signal: "elm,state,icon,hidden"; source: "elm";
908 script {
909 new m = get_int(btmode);
910 m &= ~ICON; set_int(btmode, m);
911 eval_mode(m);
912 }
913 }
914 program { signal: "elm,state,disabled"; source: "elm";
915 script {
916 new m = get_int(btmode);
917 m |= DISABLE; set_int(btmode, m);
918 eval_mode(m);
919 }
920 }
921 program { signal: "elm,state,enabled"; source: "elm";
922 script {
923 new m = get_int(btmode);
924 m &= ~DISABLE; set_int(btmode, m);
925 eval_mode(m);
926 }
927 }
928 }
929#undef ICON
930#undef LABEL
931#undef MASK
932#undef DISABLE
933}