summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2017-12-12 10:02:23 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-12 10:53:14 +0900
commit26272bf3a27dd79ffed194896d03f4af60f1b7bd (patch)
treede0591e6e4641e9876223af96e9ae442c219afbd /data
parentac63a74d1dad0296773e3cca360850b3003bb161 (diff)
win: apply conformant features.
Summary: - implement indicator enable/disable - implement indicator type - add indicator swallow area to border.edc - add 'test win indicator' sample Test Plan: elementary_test -> win_indicator Reviewers: woohyun, cedric, jpeg Subscribers: taxi2se, jypark, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5418
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/elm/border.edc136
1 files changed, 132 insertions, 4 deletions
diff --git a/data/elementary/themes/edc/elm/border.edc b/data/elementary/themes/edc/elm/border.edc
index 83ebdb260b..b788e73115 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -46,7 +46,7 @@ group { name: "elm/border/base/default";
46 desc { 46 desc {
47 rel1.to: "elm.swallow.menu"; 47 rel1.to: "elm.swallow.menu";
48 rel1.relative: 0.0 1.0; 48 rel1.relative: 0.0 1.0;
49 rel2.to: "bottom_clip"; 49 rel2.to: "elm.swallow.keyboard";
50 rel2.relative: 1.0 0.0; 50 rel2.relative: 1.0 0.0;
51 } 51 }
52 } 52 }
@@ -71,7 +71,9 @@ group { name: "elm/border/base/default";
71 rect { "bg_clip"; 71 rect { "bg_clip";
72 nomouse; 72 nomouse;
73 desc { "default"; 73 desc { "default";
74 rel.to: "elm.spacer.content"; 74 rel1.to: "top_clip";
75 rel1.relative: 0.0 1.0;
76 rel2.to: "bottom_clip";
75 } 77 }
76 } 78 }
77 rect { "elm.rect.background"; 79 rect { "elm.rect.background";
@@ -108,6 +110,17 @@ group { name: "elm/border/base/default";
108 visible: 1; 110 visible: 1;
109 } 111 }
110 } 112 }
113 spacer { "indicator_spacer";
114 desc { "default";
115 rel.to: "elm.swallow.indicator";
116 }
117 desc { "hidden";
118 rel.to: "top_clip";
119 rel1.relative: 0.0 1.0;
120 align: 0.5 0.0;
121 fixed: 1 1;
122 }
123 }
111 124
112 /* main menu */ 125 /* main menu */
113 rect { "menu_bg"; 126 rect { "menu_bg";
@@ -120,7 +133,7 @@ group { name: "elm/border/base/default";
120 swallow { "elm.swallow.menu"; 133 swallow { "elm.swallow.menu";
121 required: 1; // since 1.19 134 required: 1; // since 1.19
122 desc { "default"; 135 desc { "default";
123 rel.to: "top_clip"; 136 rel.to: "indicator_spacer";
124 rel1.relative: 0.0 1.0; 137 rel1.relative: 0.0 1.0;
125 visible: 0; 138 visible: 0;
126 align: 0.5 0.0; 139 align: 0.5 0.0;
@@ -137,7 +150,7 @@ group { name: "elm/border/base/default";
137 desc { "default"; 150 desc { "default";
138 rel1.to: "elm.swallow.menu"; 151 rel1.to: "elm.swallow.menu";
139 rel1.relative: 0.0 1.0; 152 rel1.relative: 0.0 1.0;
140 rel2.to: "bottom_clip"; 153 rel2.to: "elm.swallow.keyboard";
141 rel2.relative: 1.0 0.0; 154 rel2.relative: 1.0 0.0;
142 } 155 }
143 } 156 }
@@ -573,6 +586,14 @@ group { name: "elm/border/base/default";
573 desc { "hidden"; inherit: "default"; hid; } 586 desc { "hidden"; inherit: "default"; hid; }
574 } 587 }
575 /* bottom border - spacer and clipper */ 588 /* bottom border - spacer and clipper */
589 swallow { "elm.swallow.keyboard";
590 desc { "default";
591 rel.to: "bottom_clip";
592 rel2.relative: 1.0 0.0;
593 align: 0.0 1.0;
594 fixed: 0 1;
595 }
596 }
576 rect { "bottom_clip"; 597 rect { "bottom_clip";
577 desc { "default"; 598 desc { "default";
578 rel.to: "shadow_spacer"; 599 rel.to: "shadow_spacer";
@@ -662,6 +683,34 @@ group { name: "elm/border/base/default";
662 FIXED_SIZE(69, 5) 683 FIXED_SIZE(69, 5)
663 } 684 }
664 } 685 }
686 rect { "indicator_bg";
687 clip: "bg_clip";
688 desc { "default";
689 color: 148 23 45 255;
690 rel.to: "elm.swallow.indicator";
691 }
692 desc { "bg_transparent";
693 inherit: "default";
694 color: 0 0 0 0;
695 }
696 }
697 swallow { "elm.swallow.indicator";
698 clip: "bg_clip";
699 desc { "default";
700 rel.to: "top_clip";
701 rel1.relative: 0.0 1.0;
702 visible: 0;
703 align: 0.5 0.0;
704 fixed: 1 1;
705 }
706 desc { "visible"; inherit: "default";
707 visible: 1;
708 fixed: 0 1;
709 }
710 desc { "hidden"; inherit: "visible";
711 align: 0.5 1.0;
712 }
713 }
665 } 714 }
666 715
667#define BORDERLESS 1 716#define BORDERLESS 1
@@ -670,9 +719,16 @@ group { name: "elm/border/base/default";
670#define SET_MODE(a) script { new m = get_int(border_mode); m |= (a); set_int(border_mode, m); eval_mode(m); } 719#define SET_MODE(a) script { new m = get_int(border_mode); m |= (a); set_int(border_mode, m); eval_mode(m); }
671#define UNSET_MODE(a) script { new m = get_int(border_mode); m &= ~(a); set_int(border_mode, m); eval_mode(m); } 720#define UNSET_MODE(a) script { new m = get_int(border_mode); m &= ~(a); set_int(border_mode, m); eval_mode(m); }
672 721
722#define INDICATOR_TYPE_UNKNOWN 0
723#define INDICATOR_TYPE_BG_OPAQUE 1
724#define INDICATOR_TYPE_BG_TRANSPARENT 2
725#define INDICATOR_TYPE_HIDDEN 3
726
673 programs { 727 programs {
674 script { 728 script {
675 public border_mode; 729 public border_mode;
730 public indicator_type = 0;
731 public indicator_enabled = 0;
676 public eval_mode(m) { 732 public eval_mode(m) {
677 if (m & (BORDERLESS | MAXIMIZED | UNRESIZABLE)) { 733 if (m & (BORDERLESS | MAXIMIZED | UNRESIZABLE)) {
678 set_state(PART:"bottom_clip", "hidden", 0.0); 734 set_state(PART:"bottom_clip", "hidden", 0.0);
@@ -832,6 +888,78 @@ group { name: "elm/border/base/default";
832 UNSET_MODE(MAXIMIZED); 888 UNSET_MODE(MAXIMIZED);
833 } 889 }
834 890
891 /*indicator*/
892 program {
893 signal: "elm,action,show_indicator"; source: "elm";
894 script {
895 set_int(indicator_enabled, 1);
896 }
897 after: "update_indicator";
898 }
899 program {
900 signal: "elm,action,hide_indicator"; source: "elm";
901 script {
902 set_int(indicator_enabled, 0);
903 }
904 after: "update_indicator";
905 }
906 program {
907 signal: "elm,action,indicator,bg_opaque"; source: "elm";
908 script {
909 set_int(indicator_type, INDICATOR_TYPE_BG_OPAQUE);
910 }
911 after: "update_indicator";
912 }
913 program {
914 signal: "elm,action,indicator,bg_transparent"; source: "elm";
915 script {
916 set_int(indicator_type, INDICATOR_TYPE_BG_TRANSPARENT);
917 }
918 after: "update_indicator";
919 }
920 program {
921 signal: "elm,action,indicator,hidden"; source: "elm";
922 script {
923 set_int(indicator_type, INDICATOR_TYPE_HIDDEN);
924 }
925 after: "update_indicator";
926 }
927 program {
928 signal: "elm,action,indicator,show_effect"; source: "elm";
929 action: STATE_SET "visible";
930 transition: DECELERATE 0.2;
931 target: "elm.swallow.indicator";
932 }
933 program {
934 signal: "elm,action,indicator,hide_effect"; source: "elm";
935 action: STATE_SET "hidden";
936 transition: DECELERATE 0.2;
937 target: "elm.swallow.indicator";
938 }
939 program { name: "update_indicator";
940 script {
941 if (get_int(indicator_enabled)) {
942 if ((get_int(indicator_type) == INDICATOR_TYPE_BG_OPAQUE) ||
943 (get_int(indicator_type) == INDICATOR_TYPE_UNKNOWN)) {
944 set_state(PART:"elm.swallow.indicator", "visible", 0.0);
945 set_state(PART:"indicator_spacer", "default", 0.0);
946 set_state(PART:"indicator_bg", "default", 0.0);
947 } else if (get_int(indicator_type) == INDICATOR_TYPE_BG_TRANSPARENT) {
948 set_state(PART:"elm.swallow.indicator", "visible", 0.0);
949 set_state(PART:"indicator_spacer", "default", 0.0);
950 set_state(PART:"indicator_bg", "bg_transparent", 0.0);
951 } else if (get_int(indicator_type) == INDICATOR_TYPE_HIDDEN) {
952 set_state(PART:"elm.swallow.indicator", "hidden", 0.0);
953 set_state(PART:"indicator_spacer", "hidden", 0.0);
954 set_state(PART:"indicator_bg", "default", 0.0);
955 }
956 } else {
957 set_state(PART:"elm.swallow.indicator", "default", 0.0);
958 set_state(PART:"indicator_spacer", "default", 0.0);
959 }
960 }
961 }
962
835 /* application desktop menu */ 963 /* application desktop menu */
836 program { name: "show_menu"; 964 program { name: "show_menu";
837 signal: "elm,action,show_menu"; source: "elm"; 965 signal: "elm,action,show_menu"; source: "elm";