summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorwonguk.jeong <wonguk.jeong@samsung.com>2014-07-13 15:07:41 +0200
committerBoris Faure <billiob@gmail.com>2014-07-13 15:11:46 +0200
commit5bcf35d642e5cd5e2d7a23d16e026cdc0f7ee896 (patch)
treec0ac318886c42547bdf98aeb4608a24e592a1e09 /data
parent1891ce2ef1e785db9ce10e024133704b9f0d262e (diff)
options: opacity level configuration support
Summary: In translucency mode, opacity level could be changed with this patch. @fixes T1066 Test Plan: option -> video -> turn on translucency -> change opacity level Reviewers: billiob, raster Subscribers: seoz Maniphest Tasks: T1066 Differential Revision: https://phab.enlightenment.org/D1180
Diffstat (limited to 'data')
-rw-r--r--data/themes/default.edc97
-rw-r--r--data/themes/mild.edc53
-rw-r--r--data/themes/nyanology/default.edc53
-rw-r--r--data/themes/nyanology/nyanology.edc30
4 files changed, 121 insertions, 112 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 7d653aa..5b97f4c 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -84,26 +84,26 @@ collections {
84 /////////////////////////////////////////////////////////////////////////// 84 ///////////////////////////////////////////////////////////////////////////
85 //// the background and general container for the terminal 85 //// the background and general container for the terminal
86 group { name: "terminology/core"; 86 group { name: "terminology/core";
87 script {
88 public message(Msg_Type:type, id, ...) {
89 new r, g, b, a, v;
90
91 if (type != MSG_INT || id != 1) return;
92
93 v = getarg(2) * 255 / 100;
94
95 custom_state(PART:"fade", "default", 0.0);
96 get_state_val(PART:"fade", STATE_COLOR, r, g, b, a);
97 set_state_val(PART:"fade", STATE_COLOR, r, g, b, v);
98 set_state(PART:"fade", "custom", 0.0);
99 }
100 }
87 parts { 101 parts {
88 //////////////////////////////////////////////////////////////////// 102 ////////////////////////////////////////////////////////////////////
89 // background handling 103 // background handling
90 part { name: "fade"; type: RECT; 104 part { name: "fade"; type: RECT;
91 description { state: "default" 0.0; 105 description { state: "default" 0.0;
92 } 106 }
93 description { state: "translucent" 0.0;
94 inherit: "default" 0.0;
95 color: 255 255 255 128;
96 }
97 }
98 program {
99 signal: "translucent,on"; source: "terminology";
100 action: STATE_SET "translucent" 0.0;
101 target: "fade";
102 }
103 program {
104 signal: "translucent,off"; source: "terminology";
105 action: STATE_SET "default" 0.0;
106 target: "fade";
107 } 107 }
108 part { name: "terminology.background"; type: SWALLOW; 108 part { name: "terminology.background"; type: SWALLOW;
109 clip_to: "fade"; 109 clip_to: "fade";
@@ -186,6 +186,25 @@ collections {
186 source: "bell.wav"; 186 source: "bell.wav";
187 } 187 }
188 } 188 }
189 script {
190 public message(Msg_Type:type, id, ...) {
191 new r, g, b, a, v;
192
193 if (type != MSG_INT || id != 1) return;
194
195 v = getarg(2) * 255 / 100;
196
197 custom_state(PART:"shadow", "default", 0.0);
198 get_state_val(PART:"shadow", STATE_COLOR, r, g, b, a);
199 set_state_val(PART:"shadow", STATE_COLOR, r, g, b, v);
200 set_state(PART:"shadow", "custom", 0.0);
201
202 custom_state(PART:"base", "default", 0.0);
203 get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
204 set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
205 set_state(PART:"base", "custom", 0.0);
206 }
207 }
189 parts { 208 parts {
190 //////////////////////////////////////////////////////////////////// 209 ////////////////////////////////////////////////////////////////////
191 // background handling 210 // background handling
@@ -194,11 +213,6 @@ collections {
194 description { state: "default" 0.0; 213 description { state: "default" 0.0;
195 image.normal: "bg_shadow"; 214 image.normal: "bg_shadow";
196 fill.smooth: 0; 215 fill.smooth: 0;
197 visible: 0;
198 }
199 description { state: "translucent" 0.0;
200 inherit: "default" 0.0;
201 visible: 1;
202 } 216 }
203 } 217 }
204 part { name: "base"; type: RECT; 218 part { name: "base"; type: RECT;
@@ -206,22 +220,6 @@ collections {
206 description { state: "default" 0.0; 220 description { state: "default" 0.0;
207 color: BG_COL; 221 color: BG_COL;
208 } 222 }
209 description { state: "translucent" 0.0;
210 inherit: "default" 0.0;
211 visible: 0;
212 }
213 }
214 program {
215 signal: "translucent,on"; source: "terminology";
216 action: STATE_SET "translucent" 0.0;
217 target: "base";
218 target: "shadow";
219 }
220 program {
221 signal: "translucent,off"; source: "terminology";
222 action: STATE_SET "default" 0.0;
223 target: "base";
224 target: "shadow";
225 } 223 }
226 224
227 //////////////////////////////////////////////////////////////////// 225 ////////////////////////////////////////////////////////////////////
@@ -2581,6 +2579,25 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
2581 image { image: "bg_shadow2.png" COMP; size: 200 150 400 300; } 2579 image { image: "bg_shadow2.png" COMP; size: 200 150 400 300; }
2582 image { image: "bg_shadow3.png" COMP; size: 400 300 99999 99999; } 2580 image { image: "bg_shadow3.png" COMP; size: 400 300 99999 99999; }
2583 } 2581 }
2582 script {
2583 public message(Msg_Type:type, id, ...) {
2584 new r, g, b, a, v;
2585
2586 if (type != MSG_INT || id != 1) return;
2587
2588 v = getarg(2) * 255 / 100;
2589
2590 custom_state(PART:"shadow", "default", 0.0);
2591 get_state_val(PART:"shadow", STATE_COLOR, r, g, b, a);
2592 set_state_val(PART:"shadow", STATE_COLOR, r, g, b, v);
2593 set_state(PART:"shadow", "custom", 0.0);
2594
2595 if (v < 255)
2596 set_state(PART:"fill", "translucent", 0.0);
2597 else
2598 set_state(PART:"fill", "default", 0.0);
2599 }
2600 }
2584 parts { 2601 parts {
2585 //////////////////////////////////////////////////////////////////// 2602 ////////////////////////////////////////////////////////////////////
2586 // background and shadows 2603 // background and shadows
@@ -2605,16 +2622,6 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
2605 visible: 0; 2622 visible: 0;
2606 } 2623 }
2607 } 2624 }
2608 program {
2609 signal: "translucent,on"; source: "terminology";
2610 action: STATE_SET "translucent" 0.0;
2611 target: "fill";
2612 }
2613 program {
2614 signal: "translucent,off"; source: "terminology";
2615 action: STATE_SET "default" 0.0;
2616 target: "fill";
2617 }
2618 2625
2619 //////////////////////////////////////////////////////////////////// 2626 ////////////////////////////////////////////////////////////////////
2620 // content (where the grid of terms goes) 2627 // content (where the grid of terms goes)
diff --git a/data/themes/mild.edc b/data/themes/mild.edc
index 2db3618..c976b34 100644
--- a/data/themes/mild.edc
+++ b/data/themes/mild.edc
@@ -38,6 +38,27 @@ collections {
38 source: "bell.wav"; 38 source: "bell.wav";
39 } 39 }
40 } 40 }
41
42 script {
43 public message(Msg_Type:type, id, ...) {
44 new r, g, b, a, v;
45
46 if (type != MSG_INT || id != 1) return;
47
48 v = getarg(2) * 255 / 100;
49
50 custom_state(PART:"base", "default", 0.0);
51 get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
52 set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
53 set_state(PART:"base", "custom", 0.0);
54
55 custom_state(PART:"fade", "default", 0.0);
56 get_state_val(PART:"fade", STATE_COLOR, r, g, b, a);
57 set_state_val(PART:"fade", STATE_COLOR, r, g, b, v);
58 set_state(PART:"fade", "custom", 0.0);
59 }
60 }
61
41 parts { 62 parts {
42 //////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////
43 // background handling 64 // background handling
@@ -96,18 +117,10 @@ collections {
96 description { state: "default" 0.0; 117 description { state: "default" 0.0;
97 color: BG_COLOR; 118 color: BG_COLOR;
98 } 119 }
99 description { state: "translucent" 0.0;
100 inherit: "default" 0.0;
101 color: BG_COLOR_TRANSLUCENT;
102 }
103 } 120 }
104 part { name: "fade"; type: RECT; 121 part { name: "fade"; type: RECT;
105 description { state: "default" 0.0; 122 description { state: "default" 0.0;
106 } 123 }
107 description { state: "translucent" 0.0;
108 inherit: "default" 0.0;
109 color: 255 255 255 128;
110 }
111 } 124 }
112 part { name: "terminology.background"; type: SWALLOW; 125 part { name: "terminology.background"; type: SWALLOW;
113 clip_to: "fade"; 126 clip_to: "fade";
@@ -126,20 +139,6 @@ collections {
126 inherit: "default" 0.0; 139 inherit: "default" 0.0;
127 } 140 }
128 } 141 }
129 program { name: "trans_on";
130 signal: "translucent,on";
131 source: "terminology";
132 action: STATE_SET "translucent" 0.0;
133 target: "base";
134 target: "fade";
135 }
136 program { name: "trans_off";
137 signal: "translucent,off";
138 source: "terminology";
139 action: STATE_SET "default" 0.0;
140 target: "base";
141 target: "fade";
142 }
143 program { name: "media_off"; 142 program { name: "media_off";
144 signal: "media,off"; 143 signal: "media,off";
145 source: "terminology"; 144 source: "terminology";
@@ -1275,6 +1274,16 @@ collections {
1275 images { 1274 images {
1276 image: "pm_fill.png" COMP; 1275 image: "pm_fill.png" COMP;
1277 } 1276 }
1277 script {
1278 public message(Msg_Type:type, id, ...) {
1279 if (type != MSG_INT || id != 1) return;
1280
1281 if (getarg(2) < 100)
1282 set_state(PART:"fill", "translucent", 0.0);
1283 else
1284 set_state(PART:"fill", "default", 0.0);
1285 }
1286 }
1278 parts { 1287 parts {
1279 //////////////////////////////////////////////////////////////////// 1288 ////////////////////////////////////////////////////////////////////
1280 // background and shadows 1289 // background and shadows
diff --git a/data/themes/nyanology/default.edc b/data/themes/nyanology/default.edc
index 62b94bf..8515657 100644
--- a/data/themes/nyanology/default.edc
+++ b/data/themes/nyanology/default.edc
@@ -16,6 +16,30 @@ collections {
16 image: "pm_overlay.png" COMP; 16 image: "pm_overlay.png" COMP;
17 image: "pm_fill.png" COMP; 17 image: "pm_fill.png" COMP;
18 } 18 }
19 script {
20 public message(Msg_Type:type, id, ...) {
21 new r, g, b, a, v;
22
23 if (type != MSG_INT || id != 1) return;
24
25 v = getarg(2) * 255 / 100;
26
27 custom_state(PART:"shadow", "default", 0.0);
28 get_state_val(PART:"shadow", STATE_COLOR, r, g, b, a);
29 set_state_val(PART:"shadow", STATE_COLOR, r, g, b, v);
30 set_state(PART:"shadow", "custom", 0.0);
31
32 custom_state(PART:"base", "default", 0.0);
33 get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
34 set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
35 set_state(PART:"base", "custom", 0.0);
36
37 custom_state(PART:"fade", "default", 0.0);
38 get_state_val(PART:"fade", STATE_COLOR, r, g, b, a);
39 set_state_val(PART:"fade", STATE_COLOR, r, g, b, v);
40 set_state(PART:"base", "custom", 0.0);
41 }
42 }
19 parts { 43 parts {
20// other signals sent not handled here 44// other signals sent not handled here
21// program { name: "focus_in"; 45// program { name: "focus_in";
@@ -34,11 +58,6 @@ collections {
34 description { state: "default" 0.0; 58 description { state: "default" 0.0;
35 image.normal: "bg_shadow.png"; 59 image.normal: "bg_shadow.png";
36 fill.smooth: 0; 60 fill.smooth: 0;
37 visible: 0;
38 }
39 description { state: "translucent" 0.0;
40 inherit: "default" 0.0;
41 visible: 1;
42 } 61 }
43 } 62 }
44 part { name: "base"; type: RECT; 63 part { name: "base"; type: RECT;
@@ -46,18 +65,10 @@ collections {
46 description { state: "default" 0.0; 65 description { state: "default" 0.0;
47 color: 48 48 48 255; 66 color: 48 48 48 255;
48 } 67 }
49 description { state: "translucent" 0.0;
50 inherit: "default" 0.0;
51 visible: 0;
52 }
53 } 68 }
54 part { name: "fade"; type: RECT; 69 part { name: "fade"; type: RECT;
55 description { state: "default" 0.0; 70 description { state: "default" 0.0;
56 } 71 }
57 description { state: "translucent" 0.0;
58 inherit: "default" 0.0;
59 color: 255 255 255 128;
60 }
61 } 72 }
62 part { name: "terminology.background"; type: SWALLOW; 73 part { name: "terminology.background"; type: SWALLOW;
63 clip_to: "fade"; 74 clip_to: "fade";
@@ -76,22 +87,6 @@ collections {
76 inherit: "default" 0.0; 87 inherit: "default" 0.0;
77 } 88 }
78 } 89 }
79 program { name: "trans_on";
80 signal: "translucent,on";
81 source: "terminology";
82 action: STATE_SET "translucent" 0.0;
83 target: "base";
84 target: "shadow";
85 target: "fade";
86 }
87 program { name: "trans_off";
88 signal: "translucent,off";
89 source: "terminology";
90 action: STATE_SET "default" 0.0;
91 target: "base";
92 target: "shadow";
93 target: "fade";
94 }
95 program { name: "media_off"; 90 program { name: "media_off";
96 signal: "media,off"; 91 signal: "media,off";
97 source: "terminology"; 92 source: "terminology";
diff --git a/data/themes/nyanology/nyanology.edc b/data/themes/nyanology/nyanology.edc
index 3cb365f..bbbe90e 100644
--- a/data/themes/nyanology/nyanology.edc
+++ b/data/themes/nyanology/nyanology.edc
@@ -12,6 +12,20 @@ collections {
12 image: "pm_fill.png" COMP; 12 image: "pm_fill.png" COMP;
13 image: "cr_glow.png" COMP; 13 image: "cr_glow.png" COMP;
14 } 14 }
15 script {
16 public message(Msg_Type:type, id, ...) {
17 new r, g, b, a, v;
18
19 if (type != MSG_INT || id != 1) return;
20
21 v = getarg(2) * 255 / 100;
22
23 custom_state(PART:"base", "default", 0.0);
24 get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
25 set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
26 set_state(PART:"base", "custom", 0.0);
27 }
28 }
15 parts { 29 parts {
16// other signals sent not handled here 30// other signals sent not handled here
17// program { name: "focus_in"; 31// program { name: "focus_in";
@@ -30,10 +44,6 @@ collections {
30 description { state: "default" 0.0; 44 description { state: "default" 0.0;
31 color: 0 0 0 255; 45 color: 0 0 0 255;
32 } 46 }
33 description { state: "translucent" 0.0;
34 inherit: "default" 0.0;
35 visible: 0;
36 }
37 description { state: "catblue" 0.0; 47 description { state: "catblue" 0.0;
38 color: 0 51 102 255; 48 color: 0 51 102 255;
39 } 49 }
@@ -67,18 +77,6 @@ collections {
67 inherit: "default" 0.0; 77 inherit: "default" 0.0;
68 } 78 }
69 } 79 }
70 program { name: "trans_on";
71 signal: "translucent,on";
72 source: "terminology";
73 action: STATE_SET "translucent" 0.0;
74 target: "base";
75 }
76 program { name: "trans_off";
77 signal: "translucent,off";
78 source: "terminology";
79 action: STATE_SET "default" 0.0;
80 target: "base";
81 }
82 program { name: "media_off"; 80 program { name: "media_off";
83 signal: "media,off"; 81 signal: "media,off";
84 source: "terminology"; 82 source: "terminology";