summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-01-08 17:56:37 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-01-08 17:56:37 +0100
commit979416fc3c53d077520e807ae0a24362b6781367 (patch)
treef03be9f4642ca245268a493527390d9d93bc37b1 /data
parent0cf00dbcdf45b2d074b2147c037d432ae1b44c5a (diff)
A new theme for the new E memory gadget
hope you will like the new design
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/Makefile.am3
-rw-r--r--data/elementary/themes/edc/memusage.edc297
-rw-r--r--data/elementary/themes/img/mem_bar.pngbin0 -> 274 bytes
-rw-r--r--data/elementary/themes/img/mem_icon.pngbin3618 -> 0 bytes
-rw-r--r--data/elementary/themes/img/mem_on.pngbin0 -> 286 bytes
5 files changed, 89 insertions, 211 deletions
diff --git a/data/elementary/themes/Makefile.am b/data/elementary/themes/Makefile.am
index 308f602..656e7f0 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -556,7 +556,8 @@ elementary/themes/img/map_circle.png \
556elementary/themes/img/map_marker.png \ 556elementary/themes/img/map_marker.png \
557elementary/themes/img/map_scale.png \ 557elementary/themes/img/map_scale.png \
558elementary/themes/img/media_busy_progress.png \ 558elementary/themes/img/media_busy_progress.png \
559elementary/themes/img/mem_icon.png \ 559elementary/themes/img/mem_bar.png \
560elementary/themes/img/mem_on.png \
560elementary/themes/img/mini_blue_glow_arrow_0.png \ 561elementary/themes/img/mini_blue_glow_arrow_0.png \
561elementary/themes/img/mini_blue_glow_arrow_1.png \ 562elementary/themes/img/mini_blue_glow_arrow_1.png \
562elementary/themes/img/mini_blue_glow_arrow_2.png \ 563elementary/themes/img/mini_blue_glow_arrow_2.png \
diff --git a/data/elementary/themes/edc/memusage.edc b/data/elementary/themes/edc/memusage.edc
index 01f1691..3472816 100644
--- a/data/elementary/themes/edc/memusage.edc
+++ b/data/elementary/themes/edc/memusage.edc
@@ -1,228 +1,105 @@
1group { name: "e/modules/memusage/main"; 1group { name: "e/modules/memusage/main";
2 image: "mem_icon.png" COMP; 2 image: "mem_bar.png" COMP;
3 image: "meter_00.png" COMP; 3 image: "mem_on.png" COMP;
4 image: "meter_01.png" COMP;
5 image: "meter_02.png" COMP;
6 image: "meter_03.png" COMP;
7 image: "meter_04.png" COMP;
8 image: "meter_05.png" COMP;
9 image: "meter_06.png" COMP;
10 image: "meter_07.png" COMP;
11 image: "meter_08.png" COMP;
12 image: "meter_09.png" COMP;
13 image: "meter_10.png" COMP;
14 script { 4 script {
15 public slide_status(val) {
16 if (val == 0)
17 set_state(PART:"meter", "default", 0.0);
18 else if (val > 0 && val < 10)
19 set_state(PART:"meter", "default", 0.1);
20 else if (val >= 10 && val < 20)
21 set_state(PART:"meter", "default", 0.2);
22 else if (val >= 20 && val < 30)
23 set_state(PART:"meter", "default", 0.3);
24 else if (val >= 30 && val < 40)
25 set_state(PART:"meter", "default", 0.4);
26 else if (val >= 40 && val < 50)
27 set_state(PART:"meter", "default", 0.5);
28 else if (val >= 50 && val < 60)
29 set_state(PART:"meter", "default", 0.6);
30 else if (val >= 60 && val < 70)
31 set_state(PART:"meter", "default", 0.7);
32 else if (val >= 70 && val < 80)
33 set_state(PART:"meter", "default", 0.8);
34 else if (val >= 80 && val < 90)
35 set_state(PART:"meter", "default", 0.9);
36 else if (val >= 90 && val <= 100)
37 set_state(PART:"meter", "default", 1.0);
38 }
39 public slide_status_two(val) {
40 if (val == 0)
41 set_state(PART:"swap_meter", "default", 0.0);
42 else if (val > 0 && val < 10)
43 set_state(PART:"swap_meter", "default", 0.1);
44 else if (val >= 10 && val < 20)
45 set_state(PART:"swap_meter", "default", 0.2);
46 else if (val >= 20 && val < 30)
47 set_state(PART:"swap_meter", "default", 0.3);
48 else if (val >= 30 && val < 40)
49 set_state(PART:"swap_meter", "default", 0.4);
50 else if (val >= 40 && val < 50)
51 set_state(PART:"swap_meter", "default", 0.5);
52 else if (val >= 50 && val < 60)
53 set_state(PART:"swap_meter", "default", 0.6);
54 else if (val >= 60 && val < 70)
55 set_state(PART:"swap_meter", "default", 0.7);
56 else if (val >= 70 && val < 80)
57 set_state(PART:"swap_meter", "default", 0.8);
58 else if (val >= 80 && val < 90)
59 set_state(PART:"swap_meter", "default", 0.9);
60 else if (val >= 90 && val <= 100)
61 set_state(PART:"swap_meter", "default", 1.0);
62 }
63 public message(Msg_Type:type, id, ...) { 5 public message(Msg_Type:type, id, ...) {
64 if ((type == MSG_INT_SET) && (id == 1)) { 6 if ((type == MSG_INT_SET) && (id == 1)) {
65 new status = getarg(2); 7 new val = getarg(2);
66 new text[16]; 8 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0);
67 9 else set_state(PART:"mem_led1", "off", 0.0);
68 slide_status(status); 10 if (val > (100 / 9 * 2)) set_state(PART:"mem_led2", "on", 0.0);
69 snprintf(text, sizeof(text), "Mem: %i %%", status); 11 else set_state(PART:"mem_led2", "off", 0.0);
70 set_text(PART:"status", text); 12 if (val > (100 / 9 * 3)) set_state(PART:"mem_led3", "on", 0.0);
13 else set_state(PART:"mem_led3", "off", 0.0);
14 if (val > (100 / 9 * 4)) set_state(PART:"mem_led4", "on", 0.0);
15 else set_state(PART:"mem_led4", "off", 0.0);
16 if (val > (100 / 9 * 5)) set_state(PART:"mem_led5", "on", 0.0);
17 else set_state(PART:"mem_led5", "off", 0.0);
18 if (val > (100 / 9 * 6)) set_state(PART:"mem_led6", "on", 0.0);
19 else set_state(PART:"mem_led6", "off", 0.0);
20 if (val > (100 / 9 * 7)) set_state(PART:"mem_led7", "on", 0.0);
21 else set_state(PART:"mem_led7", "off", 0.0);
22 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0);
23 else set_state(PART:"mem_led8", "off", 0.0);
71 } 24 }
72 if ((type == MSG_INT_SET) && (id == 2)) { 25 if ((type == MSG_INT_SET) && (id == 2)) {
73 new status = getarg(2); 26 new val = getarg(2);
74 new text[16]; 27 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0);
75 28 else set_state(PART:"swp_led1", "off", 0.0);
76 slide_status_two(status); 29 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0);
77 snprintf(text, sizeof(text), "Swap: %i %%", status); 30 else set_state(PART:"swp_led2", "off", 0.0);
78 set_text(PART:"swap_status", text); 31 if (val > (100 / 9 * 3)) set_state(PART:"swp_led3", "on", 0.0);
32 else set_state(PART:"swp_led3", "off", 0.0);
33 if (val > (100 / 9 * 4)) set_state(PART:"swp_led4", "on", 0.0);
34 else set_state(PART:"swp_led4", "off", 0.0);
35 if (val > (100 / 9 * 5)) set_state(PART:"swp_led5", "on", 0.0);
36 else set_state(PART:"swp_led5", "off", 0.0);
37 if (val > (100 / 9 * 6)) set_state(PART:"swp_led6", "on", 0.0);
38 else set_state(PART:"swp_led6", "off", 0.0);
39 if (val > (100 / 9 * 7)) set_state(PART:"swp_led7", "on", 0.0);
40 else set_state(PART:"swp_led7", "off", 0.0);
41 if (val > (100 / 9 * 8)) set_state(PART:"swp_led8", "on", 0.0);
42 else set_state(PART:"swp_led8", "off", 0.0);
79 } 43 }
80 } 44 }
81 } 45 }
82 parts { 46 parts {
83 part { name: "fade_clip"; type: RECT; 47 part { name: "base"; type: SPACER;
84 description { state: "default" 0.0; 48 description { state: "default" 0.0;
85 color: 255 255 255 255; 49 aspect: 0.5 1;
86 }
87 }
88 part { name: "base";
89 clip_to: "fade_clip";
90 description { state: "default" 0.0;
91 aspect: 1.0 1.0;
92 aspect_preference: BOTH; 50 aspect_preference: BOTH;
93 image.normal: "mem_icon.png";
94 }
95 }
96 part { name: "meter";
97 clip_to: "fade_clip";
98 description { state: "default" 0.0;
99 rel1.relative: 0.1 0.2;
100 rel2.relative: 0.9 0.4;
101 image.normal: "meter_00.png";
102 color: 255 255 255 190;
103 }
104 description { state: "default" 0.1;
105 inherit: "default" 0.0;
106 image.normal: "meter_01.png";
107 }
108 description { state: "default" 0.2;
109 inherit: "default" 0.0;
110 image.normal: "meter_02.png";
111 }
112 description { state: "default" 0.3;
113 inherit: "default" 0.0;
114 image.normal: "meter_03.png";
115 }
116 description { state: "default" 0.4;
117 inherit: "default" 0.0;
118 image.normal: "meter_04.png";
119 }
120 description { state: "default" 0.5;
121 inherit: "default" 0.0;
122 image.normal: "meter_05.png";
123 }
124 description { state: "default" 0.6;
125 inherit: "default" 0.0;
126 image.normal: "meter_06.png";
127 }
128 description { state: "default" 0.7;
129 inherit: "default" 0.0;
130 image.normal: "meter_07.png";
131 }
132 description { state: "default" 0.8;
133 inherit: "default" 0.0;
134 image.normal: "meter_08.png";
135 }
136 description { state: "default" 0.9;
137 inherit: "default" 0.0;
138 image.normal: "meter_09.png";
139 }
140 description { state: "default" 1.0;
141 inherit: "default" 0.0;
142 image.normal: "meter_10.png";
143 }
144 }
145 part { name: "status"; type: TEXT;
146 effect: SHADOW BOTTOM;
147 scale: 1;
148 description { state: "default" 0.0;
149 rel1.relative: 0.1 0.2;
150 rel2.relative: 0.9 0.4;
151 color_class: "module_label";
152 color3: 255 255 255 255;
153 text { font: FNBOLD;
154 fit: 1 1;
155 ellipsis: -1;
156 align: 0.5 0.5;
157 text_class: "module_small";
158 }
159 } 51 }
160 } 52 }
161 part { name: "swap_meter"; 53
162 clip_to: "fade_clip"; 54 #define LED(_name_, _pos_) \
163 description { state: "default" 0.0; 55 part { name: _name_; \
164 rel1.relative: 0.1 0.5; 56 desc { "default"; hid; \
165 rel2.relative: 0.9 0.7; 57 rel1.relative: 0.0 (1.0 / 8 * (_pos_ - 1)); \
166 image.normal: "meter_00.png"; 58 rel2.relative: 1.0 (1.0 / 8 * _pos_); \
167 color: 255 255 255 192; 59 image.normal: "mem_on.png"; \
168 } 60 } \
169 description { state: "default" 0.1; 61 desc { "on"; inherit: "default"; vis; } \
170 inherit: "default" 0.0; 62 desc { "off"; inherit: "default"; hid; } \
171 image.normal: "meter_01.png"; 63 } \
172 } 64
173 description { state: "default" 0.2; 65 part { name: "mem";
174 inherit: "default" 0.0; 66 desc { "default";
175 image.normal: "meter_02.png"; 67 rel1.to: "base";
176 } 68 rel2.to: "base";
177 description { state: "default" 0.3; 69 rel1.relative: 0.0 0.0;
178 inherit: "default" 0.0; 70 rel2.relative: 0.5 1.0;
179 image.normal: "meter_03.png"; 71 image.normal: "mem_bar.png";
180 } 72 aspect_preference: SOURCE;
181 description { state: "default" 0.4; 73 }
182 inherit: "default" 0.0; 74 LED("mem_led1", 8)
183 image.normal: "meter_04.png"; 75 LED("mem_led2", 7)
184 } 76 LED("mem_led3", 6)
185 description { state: "default" 0.5; 77 LED("mem_led4", 5)
186 inherit: "default" 0.0; 78 LED("mem_led5", 4)
187 image.normal: "meter_05.png"; 79 LED("mem_led6", 3)
188 } 80 LED("mem_led7", 2)
189 description { state: "default" 0.6; 81 LED("mem_led8", 1)
190 inherit: "default" 0.0;
191 image.normal: "meter_06.png";
192 }
193 description { state: "default" 0.7;
194 inherit: "default" 0.0;
195 image.normal: "meter_07.png";
196 }
197 description { state: "default" 0.8;
198 inherit: "default" 0.0;
199 image.normal: "meter_08.png";
200 }
201 description { state: "default" 0.9;
202 inherit: "default" 0.0;
203 image.normal: "meter_09.png";
204 }
205 description { state: "default" 1.0;
206 inherit: "default" 0.0;
207 image.normal: "meter_10.png";
208 }
209 } 82 }
210 part { name: "swap_status"; type: TEXT; 83
211 effect: SHADOW BOTTOM; 84 part { name: "swp";
212 scale: 1; 85 desc { "default";
213 description { state: "default" 0.0; 86 rel1.to: "base";
214 rel1.relative: 0.1 0.5; 87 rel2.to: "base";
215 rel2.relative: 0.9 0.7; 88 rel1.relative: 0.5 0.0;
216 color_class: "module_label"; 89 rel2.relative: 1.0 1.0;
217 color3: 255 255 255 255; 90 image.normal: "mem_bar.png";
218 text { font: FNBOLD; 91 aspect_preference: SOURCE;
219 fit: 1 1; 92 }
220 ellipsis: -1; 93 LED("swp_led1", 8)
221 align: 0.5 0.5; 94 LED("swp_led2", 7)
222 text_class: "module_small"; 95 LED("swp_led3", 6)
223 } 96 LED("swp_led4", 5)
224 } 97 LED("swp_led5", 4)
98 LED("swp_led6", 3)
99 LED("swp_led7", 2)
100 LED("swp_led8", 1)
225 } 101 }
102
103 #undef LED
226 } 104 }
227} 105}
228
diff --git a/data/elementary/themes/img/mem_bar.png b/data/elementary/themes/img/mem_bar.png
new file mode 100644
index 0000000..1d2686d
--- /dev/null
+++ b/data/elementary/themes/img/mem_bar.png
Binary files differ
diff --git a/data/elementary/themes/img/mem_icon.png b/data/elementary/themes/img/mem_icon.png
deleted file mode 100644
index 303a45e..0000000
--- a/data/elementary/themes/img/mem_icon.png
+++ /dev/null
Binary files differ
diff --git a/data/elementary/themes/img/mem_on.png b/data/elementary/themes/img/mem_on.png
new file mode 100644
index 0000000..48d3f04
--- /dev/null
+++ b/data/elementary/themes/img/mem_on.png
Binary files differ