summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-02-21 14:44:18 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-02-21 14:44:18 +0000
commita5e3ab1d17bcf79de4ef73afe5d483118cd5e011 (patch)
treed2d0d379885a93ea7612d1ec99f4852676f88902 /data
parent895d1620772fbb339f6c66c0ea4e525eeb048f96 (diff)
TH - efl.ui check
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/efl/check.edc1105
-rw-r--r--data/elementary/themes/edc/elm/check.edc1
-rw-r--r--data/elementary/themes/macros.edc100
3 files changed, 547 insertions, 659 deletions
diff --git a/data/elementary/themes/edc/efl/check.edc b/data/elementary/themes/edc/efl/check.edc
index 0e01adc1c8..adf6c25c5b 100644
--- a/data/elementary/themes/edc/efl/check.edc
+++ b/data/elementary/themes/edc/efl/check.edc
@@ -24,511 +24,451 @@ Group: efl/check (@since 1.23)
24 Signal: efl,text,set 24 Signal: efl,text,set
25 Signal: efl,text,unset 25 Signal: efl,text,unset
26*/ 26*/
27group { "efl/check"; data.item: "version" "123"; 27#define ICON 1
28 images.image: "inset_shadow_tiny.png" COMP; 28#define LABEL 2
29 images.image: "bevel_in.png" COMP; 29#define MASK 3
30 images.image: "sym_check_alum.png" COMP; 30#define DISABLE 4
31#define ICON 1 31#define PRESSED 8
32#define LABEL 2 32#define BACKGROUND 16
33#define MASK 3 33
34#define DISABLE 4 34group { name: "efl/check";
35 script { 35 data.item: "version" "123";
36 public btmode; 36 sounds {
37 public eval_mode(m) { 37 sample { name: "wood-tap1" LOSSY 64;
38 new m1 = m & MASK; 38 source: "wood-tap.wav";
39 new d = m & DISABLE; 39 }
40 if (m1 == (ICON | LABEL)) { 40 sample { name: "wood-tap2" LOSSY 64;
41 if (!d) { 41 source: "wood-tap2.wav";
42 set_state(PART:"efl.content", "visible", 0.0);
43 set_state(PART:"sizer_content", "visible", 0.0);
44 set_state(PART:"efl.text", "visible", 0.0);
45 set_state(PART:"shadow", "default", 0.0);
46 set_state(PART:"base", "default", 0.0);
47 set_state(PART:"clip", "default", 0.0);
48 set_state(PART:"event", "default", 0.0);
49 } else {
50 set_state(PART:"efl.content", "visible", 0.0);
51 set_state(PART:"sizer_content", "visible", 0.0);
52 set_state(PART:"efl.text", "disabled_visible", 0.0);
53 set_state(PART:"shadow", "disabled", 0.0);
54 set_state(PART:"base", "disabled", 0.0);
55 set_state(PART:"clip", "disabled", 0.0);
56 set_state(PART:"event", "disabled", 0.0);
57 }
58 } else if (m1 == (ICON)) {
59 if (!d) {
60 set_state(PART:"efl.content", "visible", 0.0);
61 set_state(PART:"sizer_content", "icononly", 0.0);
62 set_state(PART:"efl.text", "default", 0.0);
63 set_state(PART:"shadow", "default", 0.0);
64 set_state(PART:"base", "default", 0.0);
65 set_state(PART:"clip", "default", 0.0);
66 set_state(PART:"event", "default", 0.0);
67 } else {
68 set_state(PART:"efl.content", "visible", 0.0);
69 set_state(PART:"sizer_content", "icononly", 0.0);
70 set_state(PART:"efl.text", "disabled", 0.0);
71 set_state(PART:"shadow", "disabled", 0.0);
72 set_state(PART:"base", "disabled", 0.0);
73 set_state(PART:"clip", "disabled", 0.0);
74 set_state(PART:"event", "disabled", 0.0);
75 }
76 } else if (m1 == (LABEL)) {
77 if (!d) {
78 set_state(PART:"efl.content", "default", 0.0);
79 set_state(PART:"sizer_content", "default", 0.0);
80 set_state(PART:"efl.text", "visible", 0.0);
81 set_state(PART:"shadow", "default", 0.0);
82 set_state(PART:"base", "default", 0.0);
83 set_state(PART:"clip", "default", 0.0);
84 set_state(PART:"event", "default", 0.0);
85 } else {
86 set_state(PART:"efl.content", "default", 0.0);
87 set_state(PART:"sizer_content", "default", 0.0);
88 set_state(PART:"efl.text", "disabled_visible", 0.0);
89 set_state(PART:"shadow", "disabled", 0.0);
90 set_state(PART:"base", "disabled", 0.0);
91 set_state(PART:"clip", "disabled", 0.0);
92 set_state(PART:"event", "disabled", 0.0);
93 }
94 } else {
95 if (!d) {
96 set_state(PART:"efl.content", "default", 0.0);
97 set_state(PART:"sizer_content", "default", 0.0);
98 set_state(PART:"efl.text", "default", 0.0);
99 set_state(PART:"shadow", "default", 0.0);
100 set_state(PART:"base", "default", 0.0);
101 set_state(PART:"clip", "default", 0.0);
102 set_state(PART:"event", "default", 0.0);
103 } else {
104 set_state(PART:"efl.content", "default", 0.0);
105 set_state(PART:"sizer_content", "default", 0.0);
106 set_state(PART:"efl.text", "default", 0.0);
107 set_state(PART:"shadow", "disabled", 0.0);
108 set_state(PART:"base", "disabled", 0.0);
109 set_state(PART:"clip", "disabled", 0.0);
110 set_state(PART:"event", "disabled", 0.0);
111 }
112 }
113 } 42 }
114 } 43 }
44 script {
45 BUTTONMODE_SCRIPT2
46 }
115 parts { 47 parts {
116 part { name: "base"; type: RECT; 48 part { name: "shadow"; type: SPACER;
117 description { state: "default" 0.0; 49 description { state: "default";
118 rel1.offset: 1 1;
119 rel1.to: "inset";
120 rel2.offset: -2 -2;
121 rel2.to: "inset";
122 color: 24 24 24 255;
123 } 50 }
124 description { state: "disabled" 0.0; 51 desc { "pressed"; inherit;
125 inherit: "default" 0.0;
126 color: 64 64 64 255;
127 } 52 }
128 } 53 desc { "disabled"; inherit;
129 part { name: "shadow"; mouse_events: 0;
130 description { state: "default" 0.0;
131 image.normal: "inset_shadow_tiny.png";
132 image.border: 4 4 4 4;
133 rel1.to: "base";
134 rel2.to: "base";
135 }
136 description { state: "disabled" 0.0;
137 inherit: "default" 0.0;
138 visible: 0;
139 } 54 }
140 } 55 }
141 part { name: "inset"; mouse_events: 0; 56 rect { "icon_clip";
142 scale: 1; 57 desc { "default";
143 description { state: "default" 0.0; 58 color_class: "button_icon";
144 fixed: 1 0;
145 rel1.offset: 2 2;
146 rel2.relative: 0.0 1.0;
147 rel2.offset: 2 -3;
148 align: 0.0 0.5;
149 min: 13 13;
150 max: 13 13;
151 image.normal: "bevel_in.png";
152 image.border: 1 1 1 1;
153 image.middle: 0;
154 fill.smooth: 0;
155 } 59 }
156 } 60 desc { "pressed"; inherit;
157 part { name: "indicator"; mouse_events: 0; 61 color_class: "button_icon_pressed";
158 scale: 1;
159 clip_to: "clip";
160 description { state: "default" 0.0;
161 fixed: 1 1;
162 rel1.to: "base";
163 rel2.to: "base";
164 image.normal: "sym_check_alum.png";
165 min: 11 11;
166 max: 11 11;
167 visible: 0;
168 } 62 }
169 description { state: "selected" 0.0; 63 desc { "disabled"; inherit;
170 inherit: "default" 0.0; 64 color_class: "button_icon_disabled";
171 visible: 1;
172 } 65 }
173 } 66 }
174 part { name: "clip"; type: RECT; 67 swallow { "efl.background"; nomouse;
175 description { state: "default" 0.0; 68 required;
69 desc { "default";
70 rel.to: "shadow";
71 visible: 0;
176 } 72 }
177 description { state: "disabled" 0.0; 73 desc { "visible";
178 inherit: "default" 0.0; 74 inherit: "default";
179 color: 255 255 255 64; 75 visible: 1;
180 } 76 }
181 } 77 }
182 part { name: "efl.content"; type: SWALLOW; 78 swallow { "efl.content"; nomouse;
79 clip_to: "icon_clip";
183 scale: 1; 80 scale: 1;
184 clip_to: "clip"; 81 desc { "default";
185 required;
186 description { state: "default" 0.0;
187 fixed: 1 0; 82 fixed: 1 0;
188 visible: 0;
189 align: 0.0 0.5; 83 align: 0.0 0.5;
190 max: 0 0; 84 rel1.to_x: "base";
191 rel1.to_x: "inset"; 85 rel2.to_x: "base";
86 rel1.offset: 4 4;
192 rel1.relative: 1.0 0.0; 87 rel1.relative: 1.0 0.0;
193 rel1.offset: 1 1; 88 rel2.relative: 0.0 1.0;
194 rel2.to_x: "inset"; 89 rel2.offset: 4 -5;
195 rel2.offset: 1 -2; 90 visible: 0;
196 rel2.relative: 1.0 1.0; 91 offscale;
197 } 92 }
198 description { state: "visible" 0.0; 93 desc { "visible"; inherit;
199 inherit: "default" 0.0; 94 fixed: 1 0;
200 visible: 1;
201 aspect: 1.0 1.0; 95 aspect: 1.0 1.0;
202 min: 16 16; 96 min: ICMIN ICMIN;
97 visible: 1;
98 }
99 desc { "icononly"; inherit;
100 fixed: 0 0;
101 align: 0.5 0.5;
102 rel2.relative: 1.0 1.0;
103 rel2.offset: -5 -5;
104 rel2.to_x: "";
105 visible: 1;
203 } 106 }
204 } 107 }
205 part { name: "sizer_content"; type: TEXT; mouse_events: 0; 108 text { "sizer_content"; nomouse;
206 scale: 1; 109 scale: 1;
207 description { state: "default" 0.0; 110 desc { "default";
208 fixed: 1 1; 111 fixed: 1 1;
209 visible: 0; 112 visible: 0;
210 text { font: FN; size: 10; 113 text { font: FN; size: 10;
211 min: 0 0; 114 min: 0 0;
212 text_class: "check_text"; 115 text_class: "button_text";
213 } 116 }
214 } 117 }
215 description { state: "visible" 0.0; 118 desc { "visible"; inherit;
216 inherit: "default" 0.0; 119 rel.to: "efl.content";
217 rel1.to: "efl.content";
218 rel2.to: "efl.content";
219 text { 120 text {
220 min: 1 1; 121 min: 1 1;
221 ellipsis: -1; 122 ellipsis: -1;
222 text: "M"; 123 text: SPACER_TEXT;
223 } 124 }
224 } 125 }
225 description { state: "icononly" 0.0; 126 desc { "icononly"; inherit;
226 inherit: "default" 0.0; 127 rel.to: "efl.content";
227 rel1.to: "efl.content";
228 rel2.to: "efl.content";
229 text { 128 text {
230 min: 1 1; 129 min: 1 1;
231 ellipsis: -1; 130 ellipsis: -1;
232 text: "M"; 131 text: SPACER_TEXT;
233 } 132 }
234 } 133 }
235 } 134 }
236 part { name: "efl.text"; type: TEXT; mouse_events: 0; 135 part { name: "base"; type: RECT;
237 effect: SHADOW BOTTOM; 136 scale: 1;
137 description { state: "default";
138 fixed: 1 0;
139 color: 0 0 0 64;
140 align: 0.0 0.5;
141 min: 13 13;
142 max: 13 13;
143 rel1.offset: 4 4;
144 rel2.relative: 0.0 1.0;
145 rel2.offset: 4 -5;
146 aspect: 1.0 1.0; aspect_preference: VERTICAL;
147 offscale;
148 }
149 desc { "pressed"; inherit;
150 color: 0 0 0 128;
151 }
152 desc { "disabled"; inherit;
153 color: 0 0 0 16;
154 }
155 }
156 part { name: "ck_check";
157 clip_to: "ck_selected";
238 scale: 1; 158 scale: 1;
239 required;
240 description { state: "default" 0.0; 159 description { state: "default" 0.0;
241 rel1.offset: 2 2; 160 fixed: 0 0;
242 rel1.to_x: "efl.content"; 161 rel.to: "base";
162 image.normal: "i-check";
163 min: 15 15;
164 max: 15 15;
165 visible: 0;
166 color: 160 160 160 255;
167 fixed: 1 1;
168 }
169 description { state: "pressed" 0.0;
170 inherit: "default" 0.0;
171 color: 255 255 255 255;
172 visible: 1;
173 }
174 description { state: "selected" 0.0;
175 inherit: "default" 0.0;
176 visible: 1;
177 }
178 }
179 part { name: "ck_selected"; type: RECT;
180 description { state: "default" 0.0;
181 rel.to: "base";
182 }
183 description { state: "disabled" 0.0;
184 inherit: "default" 0.0;
185 color: 153 153 153 255;
186 }
187 }
188 text { "efl.text"; nomouse;
189 scale: 1;
190 desc { "default";
191 fixed: 0 1;
192 color: 160 160 160 255;
193 rel1.offset: 0 4;
243 rel1.relative: 1.0 0.0; 194 rel1.relative: 1.0 0.0;
244 rel2.offset: -3 -3; 195 rel1.to_x: "efl.content";
245 color: FN_COL_DEFAULT; 196 rel2.offset: -5 -5;
246 color_class: "check_text";
247 text { font: FN; size: 10; 197 text { font: FN; size: 10;
248 min: 0 0; 198 align: 0.0 0.5;
249 align: 0.0 0.5; 199 min: 0 0;
250 text_class: "check";
251 } 200 }
201 visible: 0;
202 offscale;
252 } 203 }
253 description { state: "disabled" 0.0; 204 desc { "visible"; inherit;
254 inherit: "default" 0.0; 205 fixed: 0 0;
255 color_class: "check_text_disabled"; 206 rel1.offset: 4 4;
256 color3: 255 255 255 255; 207 text.min: 1 1;
208 text.ellipsis: -1;
209 visible: 1;
257 } 210 }
258 description { state: "visible" 0.0; 211 desc { "pressed_visible"; inherit;
259 inherit: "default" 0.0; 212 fixed: 0 0;
213 color: 255 255 255 255;
214 rel1.offset: 4 4;
215 text.min: 1 1;
216 text.ellipsis: -1;
260 visible: 1; 217 visible: 1;
218 }
219 desc { "textonly"; inherit;
220 fixed: 0 0;
261 text.min: 1 1; 221 text.min: 1 1;
262 text.ellipsis: -1; 222 text.ellipsis: -1;
223 visible: 1;
263 } 224 }
264 description { state: "disabled_visible" 0.0; 225 desc { "pressed_textonly"; inherit;
265 inherit: "default" 0.0; 226 fixed: 0 0;
266 color_class: "check_text_disabled"; 227 color: 255 255 255 255;
267 color3: 255 255 255 255; 228 text.min: 1 1;
229 text.ellipsis: -1;
268 visible: 1; 230 visible: 1;
231 }
232 desc { "disabled_visible"; inherit;
233 fixed: 0 0;
234 color: 96 96 96 255;
235 rel1.offset: 4 4;
269 text.min: 1 1; 236 text.min: 1 1;
270 text.ellipsis: -1; 237 text.ellipsis: -1;
238 visible: 1;
239 }
240 desc { "disabled_textonly"; inherit;
241 fixed: 0 0;
242 color: 96 96 96 255;
243 text.min: 1 1;
244 text.ellipsis: -1;
245 visible: 1;
271 } 246 }
272 } 247 }
273 part { name: "event"; type: RECT; 248 rect { "event";
274 ignore_flags: ON_HOLD; 249 ignore_flags: ON_HOLD;
275 description { state: "default" 0.0; 250 desc { "default";
276 color: 0 0 0 0; 251 color: 0 0 0 0;
277 } 252 }
278 description { state: "disabled" 0.0; 253 desc { "disabled"; inherit;
279 inherit: "default" 0.0;
280 visible: 0; 254 visible: 0;
281 } 255 }
282 } 256 }
283 } 257 }
284 programs { 258 programs {
285 EFL_UI_CLICKABLE_PART_BIND(event) 259 EFL_UI_CLICKABLE_PART_BIND("event")
286 program { 260 program { signal: "mouse,down,1"; source: "event";
287 signal: "efl,state,selected"; source: "efl"; 261 script {
262 new buf[32]; new Float:val;
263 get_state(PART:"ck_check", buf, 32, val);
264 if (!strcmp(buf, "default")) { run_program(PROGRAM:"snd-check-on"); }
265 else { run_program(PROGRAM:"snd-check-off"); }
266 echo(buf);
267 }
268 }
269 program { signal: "efl,state,selected"; source: "efl";
288 action: STATE_SET "selected" 0.0; 270 action: STATE_SET "selected" 0.0;
289 target: "indicator"; 271 target: "ck_check";
290 } 272 }
291 program { 273 program { signal: "efl,state,unselected"; source: "efl";
292 signal: "efl,state,unselected"; source: "efl";
293 action: STATE_SET "default" 0.0; 274 action: STATE_SET "default" 0.0;
294 target: "indicator"; 275 target: "ck_check";
295 } 276 }
296 program { 277 program { name: "snd-check-on";
297 signal: "efl,text,set"; source: "efl"; 278 action: PLAY_SAMPLE "wood-tap1" 1.0 INPUT;
298 script {
299 new m = get_int(btmode);
300 m |= LABEL; set_int(btmode, m);
301 eval_mode(m);
302 }
303 } 279 }
304 program { 280 program { name: "snd-check-off";
305 signal: "efl,text,unset"; source: "efl"; 281 action: PLAY_SAMPLE "wood-tap2" 1.0 INPUT;
306 script {
307 new m = get_int(btmode);
308 m &= ~LABEL; set_int(btmode, m);
309 eval_mode(m);
310 }
311 } 282 }
312 program { 283 program { signal: "mouse,down,1"; source: "event";
313 signal: "efl,content,set"; source: "efl"; 284 action: SIGNAL_EMIT "efl,action,press" "efl";
314 script { 285 after: "button_click_anim";
315 new m = get_int(btmode);
316 m |= ICON; set_int(btmode, m);
317 eval_mode(m);
318 }
319 } 286 }
320 program { 287 program { signal: "mouse,down,1"; source: "event";
321 signal: "efl,content,unset"; source: "efl"; 288 action: STATE_SET "pressed" 0.0;
322 script { 289 target: "ck_check";
323 new m = get_int(btmode);
324 m &= ~ICON; set_int(btmode, m);
325 eval_mode(m);
326 }
327 } 290 }
328 program { 291 program { name: "button_click_anim";
329 signal: "efl,state,disabled"; source: "efl"; 292 script { flag_set(PRESSED); }
330 script {
331 new m = get_int(btmode);
332 m |= DISABLE; set_int(btmode, m);
333 eval_mode(m);
334 }
335 } 293 }
336 program { 294 program { signal: "mouse,up,1"; source: "event";
337 signal: "efl,state,enabled"; source: "efl"; 295 action: STATE_SET "default" 0.0;
338 script { 296 target: "ck_check";
339 new m = get_int(btmode); 297 }
340 m &= ~DISABLE; set_int(btmode, m); 298 program { signal: "mouse,up,1"; source: "event";
341 eval_mode(m); 299 script { flag_unset(PRESSED); }
342 } 300 }
301 program { signal: "efl,text,set"; source: "efl";
302 script { flag_set(LABEL); }
303 }
304 program { signal: "efl,text,unset"; source: "efl";
305 script { flag_unset(LABEL); }
306 }
307 program { signal: "efl,content,set"; source: "efl";
308 script { flag_set(ICON); }
309 }
310 program { signal: "efl,content,unset"; source: "efl";
311 script { flag_unset(ICON); }
312 }
313 program { signal: "efl,state,disabled"; source: "efl";
314 script { flag_set(DISABLE); }
315 }
316 program { signal: "efl,state,enabled"; source: "efl";
317 script { flag_unset(DISABLE); }
318 }
319 program { signal: "efl,state,disabled"; source: "efl";
320 action: STATE_SET "disabled" 0.0;
321 target: "ck_selected";
322 }
323 program { signal: "efl,state,enabled"; source: "efl";
324 action: STATE_SET "default" 0.0;
325 target: "ck_selected";
343 } 326 }
344 } 327 }
345#undef ICON
346#undef LABEL
347#undef MASK
348#undef DISABLE
349} 328}
350 329
351group { "efl/check:toggle"; data.item: "version" "123"; 330group { name: "efl/check:toggle";
352 images.image: "inset_shadow_tiny.png" COMP;
353 images.image: "bevel_in.png" COMP;
354 images.image: "bevel_out.png" COMP;
355 images.image: "vgrad_med_lighter.png" COMP;
356 images.image: "shadow_square_tiny.png" COMP;
357 images.image: "glow_small.png" COMP;
358
359#define ICON 1
360#define LABEL 2
361#define MASK 3
362#define DISABLE 4
363 script { 331 script {
364 public is_rtl;
365 public is_drag; 332 public is_drag;
366 public was_drag; 333 public was_drag;
367 public btmode; 334 public is_rtl;
368 public eval_mode(m) { 335
369 new m1 = m & MASK; 336 BUTTONMODE_SCRIPT2
370 new d = m & DISABLE; 337 }
371 if (m1 == (ICON | LABEL)) { 338 parts {
372 if (!d) { 339 part { name: "shadow"; type: SPACER;
373 set_state(PART:"efl.content", "visible", 0.0); 340 description { state: "default";
374 set_state(PART:"sizer_content", "visible", 0.0); 341 }
375 set_state(PART:"efl.text", "visible", 0.0); 342 desc { "pressed"; inherit;
376 set_state(PART:"shadow", "default", 0.0); 343 }
377 set_state(PART:"clip", "default", 0.0); 344 desc { "disabled"; inherit;
378 set_state(PART:"event", "default", 0.0); 345 }
379 set_state(PART:"event2", "default", 0.0); 346 }
380 set_state(PART:"efl.ontext", "default", 0.0); 347 swallow { "efl.background"; nomouse;
381 set_state(PART:"efl.offtext", "default", 0.0); 348 required;
382 set_state(PART:"onrect", "default", 0.0); 349 desc { "default";
383 set_state(PART:"offrect", "default", 0.0); 350 rel.to: "shadow";
384 } else { 351 visible: 0;
385 set_state(PART:"efl.content", "visible", 0.0); 352 }
386 set_state(PART:"sizer_content", "visible", 0.0); 353 desc { "visible";
387 set_state(PART:"efl.text", "disabled_visible", 0.0); 354 inherit: "default";
388 set_state(PART:"shadow", "disabled", 0.0); 355 visible: 1;
389 set_state(PART:"clip", "disabled", 0.0); 356 }
390 set_state(PART:"event", "disabled", 0.0); 357 }
391 set_state(PART:"event2", "disabled", 0.0); 358 rect { "icon_clip";
392 set_state(PART:"efl.ontext", "disabled", 0.0); 359 desc { "default";
393 set_state(PART:"efl.offtext", "disabled", 0.0); 360 color_class: "button_icon";
394 set_state(PART:"onrect", "disabled", 0.0); 361 }
395 set_state(PART:"offrect", "disabled", 0.0); 362 desc { "pressed"; inherit;
396 } 363 color_class: "button_icon_pressed";
397 } else if (m1 == (ICON)) { 364 }
398 if (!d) { 365 desc { "disabled"; inherit;
399 set_state(PART:"efl.content", "visible", 0.0); 366 color_class: "button_icon_disabled";
400 set_state(PART:"sizer_content", "icononly", 0.0); 367 }
401 set_state(PART:"efl.text", "default", 0.0); 368 }
402 set_state(PART:"shadow", "default", 0.0); 369 swallow { "efl.content"; nomouse;
403 set_state(PART:"clip", "default", 0.0); 370 clip_to: "icon_clip";
404 set_state(PART:"event", "default", 0.0); 371 scale: 1;
405 set_state(PART:"event2", "default", 0.0); 372 desc { "default";
406 set_state(PART:"efl.ontext", "default", 0.0); 373 fixed: 1 0;
407 set_state(PART:"efl.offtext", "default", 0.0); 374 align: 0.0 0.5;
408 set_state(PART:"onrect", "default", 0.0); 375 rel1.offset: 4 4;
409 set_state(PART:"offrect", "default", 0.0); 376 rel2.relative: 0.0 1.0;
410 } else { 377 rel2.offset: 4 -5;
411 set_state(PART:"efl.content", "visible", 0.0); 378 visible: 0;
412 set_state(PART:"sizer_content", "icononly", 0.0); 379 offscale;
413 set_state(PART:"efl.text", "disabled", 0.0); 380 }
414 set_state(PART:"shadow", "disabled", 0.0); 381 desc { "visible"; inherit;
415 set_state(PART:"clip", "disabled", 0.0); 382 fixed: 1 0;
416 set_state(PART:"event", "disabled", 0.0); 383 aspect: 1.0 1.0;
417 set_state(PART:"event2", "disabled", 0.0); 384 visible: 1;
418 set_state(PART:"efl.ontext", "disabled", 0.0); 385 }
419 set_state(PART:"efl.offtext", "disabled", 0.0); 386 desc { "icononly"; inherit;
420 set_state(PART:"onrect", "disabled", 0.0); 387 fixed: 0 0;
421 set_state(PART:"offrect", "disabled", 0.0); 388 align: 0.5 0.5;
389 rel2.relative: 1.0 1.0;
390 rel2.offset: -5 -5;
391 rel2.to_x: "tog";
392 rel2.relative: 0.0 1.0;
393 visible: 1;
394 }
395 }
396 text { "sizer_content"; nomouse;
397 scale: 1;
398 desc { "default";
399 visible: 0;
400 text { font: FN; size: 10;
401 min: 0 0;
402 text_class: "button_text";
422 } 403 }
423 } else if (m1 == (LABEL)) { 404 }
424 if (!d) { 405 desc { "visible"; inherit;
425 set_state(PART:"efl.content", "default", 0.0); 406 rel.to: "efl.content";
426 set_state(PART:"sizer_content", "default", 0.0); 407 text {
427 set_state(PART:"efl.text", "visible", 0.0); 408 min: 1 1;
428 set_state(PART:"shadow", "default", 0.0); 409 ellipsis: -1;
429 set_state(PART:"clip", "default", 0.0); 410 text: SPACER_TEXT;
430 set_state(PART:"event", "default", 0.0);
431 set_state(PART:"event2", "default", 0.0);
432 set_state(PART:"efl.ontext", "default", 0.0);
433 set_state(PART:"efl.offtext", "default", 0.0);
434 set_state(PART:"onrect", "default", 0.0);
435 set_state(PART:"offrect", "default", 0.0);
436 } else {
437 set_state(PART:"efl.content", "default", 0.0);
438 set_state(PART:"sizer_content", "default", 0.0);
439 set_state(PART:"efl.text", "disabled_visible", 0.0);
440 set_state(PART:"shadow", "disabled", 0.0);
441 set_state(PART:"clip", "disabled", 0.0);
442 set_state(PART:"event", "disabled", 0.0);
443 set_state(PART:"event2", "disabled", 0.0);
444 set_state(PART:"efl.ontext", "disabled", 0.0);
445 set_state(PART:"efl.offtext", "disabled", 0.0);
446 set_state(PART:"onrect", "disabled", 0.0);
447 set_state(PART:"offrect", "disabled", 0.0);
448 } 411 }
449 } else { 412 }
450 if (!d) { 413 desc { "icononly"; inherit;
451 set_state(PART:"efl.content", "default", 0.0); 414 rel.to: "efl.content";
452 set_state(PART:"sizer_content", "default", 0.0); 415 text {
453 set_state(PART:"efl.text", "default", 0.0); 416 min: 1 1;
454 set_state(PART:"shadow", "default", 0.0); 417 ellipsis: -1;
455 set_state(PART:"clip", "default", 0.0); 418 text: SPACER_TEXT;
456 set_state(PART:"event", "default", 0.0);
457 set_state(PART:"event2", "default", 0.0);
458 set_state(PART:"efl.ontext", "default", 0.0);
459 set_state(PART:"efl.offtext", "default", 0.0);
460 set_state(PART:"onrect", "default", 0.0);
461 set_state(PART:"offrect", "default", 0.0);
462 } else {
463 set_state(PART:"efl.content", "default", 0.0);
464 set_state(PART:"sizer_content", "default", 0.0);
465 set_state(PART:"efl.text", "default", 0.0);
466 set_state(PART:"shadow", "disabled", 0.0);
467 set_state(PART:"clip", "disabled", 0.0);
468 set_state(PART:"event", "disabled", 0.0);
469 set_state(PART:"event2", "disabled", 0.0);
470 set_state(PART:"efl.ontext", "disabled", 0.0);
471 set_state(PART:"efl.offtext", "disabled", 0.0);
472 set_state(PART:"onrect", "disabled", 0.0);
473 set_state(PART:"offrect", "disabled", 0.0);
474 } 419 }
475 } 420 }
476 } 421 }
477 } 422 spacer { name: "tog"; scale: 1;
478 parts {
479 part { name: "tog"; type: SPACER;
480 scale: 1;
481 description { state: "default" 0.0; 423 description { state: "default" 0.0;
482 fixed: 1 0; 424 fixed: 1 1;
483 rel1.relative: 1.0 0.0; 425 rel1.relative: 1.0 0.0;
484 rel1.offset: 2 2; 426 rel1.offset: -5 4;
485 rel2.offset: -3 -3; 427 rel2.offset: -5 -5;
486 align: 1.0 0.5; 428 align: 1.0 0.5;
487 min: 88 15; 429 min: 88 15;
488 max: 88 15; 430 max: 88 15;
431 offscale;
489 } 432 }
490 } 433 }
491 part { name: "onrect"; type: RECT; mouse_events: 0; 434 rect { name: "base";
492 scale: 1; 435 description { state: "default";
493 clip_to: "tog_clip"; 436 fixed: 1 1;
437 color: 0 0 0 64;
438 rel.to: "tog";
439 }
440 desc { "pressed"; inherit;
441 color: 0 0 0 128;
442 }
443 desc { "disabled"; inherit;
444 color: 0 0 0 16;
445 }
446 }
447 spacer { name: "onrect";
494 description { state: "default" 0.0; 448 description { state: "default" 0.0;
495 rel1.to: "button"; 449 rel.to: "button";
496 rel1.relative: -5.0 0.0; 450 rel1.relative: -5.0 0.0;
497 rel2.to: "button";
498 rel2.relative: 0.5 1.0; 451 rel2.relative: 0.5 1.0;
499 color: 24 24 24 255;
500 }
501 description { state: "disabled" 0.0;
502 inherit: "default" 0.0;
503 color: 64 64 64 255;
504 } 452 }
505 } 453 }
506 part { name: "offrect"; type: RECT; mouse_events: 0; 454 spacer { name: "offrect";
507 scale: 1;
508 clip_to: "tog_clip";
509 description { state: "default" 0.0; 455 description { state: "default" 0.0;
510 rel1.to: "button"; 456 rel.to: "button";
511 rel1.relative: 0.5 0.0; 457 rel1.relative: 0.5 0.0;
512 rel2.to: "button";
513 rel2.relative: 6.0 1.0; 458 rel2.relative: 6.0 1.0;
514 color: 24 24 24 255;
515 }
516 description { state: "disabled" 0.0;
517 inherit: "default" 0.0;
518 color: 64 64 64 255;
519 } 459 }
520 } 460 }
521 part { name: "efl.offtext"; type: TEXT; mouse_events: 0; 461 text { name: "efl.offtext"; nomouse; scale: 1;
522 effect: SHADOW BOTTOM;
523 scale: 1;
524 clip_to: "tog_clip"; 462 clip_to: "tog_clip";
525 description { state: "default" 0.0; 463 description { state: "default" 0.0;
526 fixed: 1 1; 464 fixed: 1 1;
527 rel1.to: "button"; 465 rel1.to: "button";
528 rel1.relative: 1.0 0.0; 466 rel1.relative: 1.0 0.0;
467 rel1.offset: 4 0;
529 rel2.to: "offrect"; 468 rel2.to: "offrect";
530 color: FN_COL_DEFAULT; 469 rel2.offset: -5 -1;
531 color_class: "check_off_text"; 470 offscale;
471 color: 160 160 160 255;
532 text { font: FN; size: 10; 472 text { font: FN; size: 10;
533 min: 0 1; 473 min: 0 1;
534 align: 0.5 0.5; 474 align: 0.5 0.5;
@@ -538,24 +478,24 @@ group { "efl/check:toggle"; data.item: "version" "123";
538 } 478 }
539 description { state: "disabled" 0.0; 479 description { state: "disabled" 0.0;
540 inherit: "default" 0.0; 480 inherit: "default" 0.0;
541 color_class: "check_off_text_disabled"; 481 color: 96 96 96 255;
542 color3: 255 255 255 255; 482 }
483 description { state: "clicked" 0.0;
484 inherit: "default" 0.0;
485 color: 255 255 255 255;
543 } 486 }
544 } 487 }
545 part { name: "efl.ontext"; type: TEXT; mouse_events: 0; 488 text { name: "efl.ontext"; nomouse; scale: 1;
546 effect: GLOW;
547 scale: 1;
548 clip_to: "tog_clip"; 489 clip_to: "tog_clip";
549 description { state: "default" 0.0; 490 description { state: "default" 0.0;
550 fixed: 1 1; 491 fixed: 1 1;
551 rel1.to: "onrect"; 492 rel1.to: "onrect";
552 rel1.offset: 2 -1; 493 rel1.offset: 4 0;
553 rel2.to: "button"; 494 rel2.to: "button";
554 rel2.relative: 0.0 1.0; 495 rel2.relative: 0.0 1.0;
555 rel2.offset: -1 -2; 496 rel2.offset: -5 -1;
556 color_class: "check_on_text"; 497 offscale;
557 color2: 255 255 255 255; 498 color: 51 153 255 255;
558 color3: 255 255 255 255;
559 text { font: FN; size: 10; 499 text { font: FN; size: 10;
560 min: 0 1; 500 min: 0 1;
561 align: 0.5 0.5; 501 align: 0.5 0.5;
@@ -565,44 +505,19 @@ group { "efl/check:toggle"; data.item: "version" "123";
565 } 505 }
566 description { state: "disabled" 0.0; 506 description { state: "disabled" 0.0;
567 inherit: "default" 0.0; 507 inherit: "default" 0.0;
568 color_class: "check_on_text_disabled"; 508 color: 96 96 96 255;
569 color3: 255 255 255 255;
570 } 509 }
571 } 510 description { state: "clicked" 0.0;
572 part { name: "shadow"; mouse_events: 0;
573 description { state: "default" 0.0;
574 image.normal: "inset_shadow_tiny.png";
575 image.border: 4 4 4 4;
576 rel1.to: "tog";
577 rel2.to: "tog";
578 }
579 description { state: "disabled" 0.0;
580 inherit: "default" 0.0; 511 inherit: "default" 0.0;
581 visible: 0; 512 color: 255 255 255 255;
582 }
583 }
584 part { name: "inset"; mouse_events: 0;
585 scale: 1;
586 description { state: "default" 0.0;
587 fixed: 1 1;
588 rel1.to: "tog";
589 rel1.offset: -1 -1;
590 rel2.to: "tog";
591 rel2.offset: 0 0;
592 image.normal: "bevel_in.png";
593 image.border: 1 1 1 1;
594 image.middle: 0;
595 fill.smooth: 0;
596 } 513 }
597 } 514 }
598 part { name: "tog_clip"; type: RECT; 515 part { name: "tog_clip"; type: RECT;
599 description { state: "default" 0.0; 516 description { state: "default" 0.0;
600 rel1.to: "tog"; 517 rel.to: "tog";
601 rel2.to: "tog";
602 } 518 }
603 } 519 }
604 part { name: "button"; type: RECT; 520 part { name: "button"; type: RECT; scale: 1;
605 scale: 1;
606 clip_to: "tog_clip"; 521 clip_to: "tog_clip";
607 dragable { 522 dragable {
608 x: 1 1 0; 523 x: 1 1 0;
@@ -611,219 +526,132 @@ group { "efl/check:toggle"; data.item: "version" "123";
611 } 526 }
612 description { state: "default" 0.0; 527 description { state: "default" 0.0;
613 fixed: 1 1; 528 fixed: 1 1;
614 rel1.to: "tog"; 529 rel.to: "tog";
615 rel2.to: "tog";
616 min: 15 15; 530 min: 15 15;
617 max: 15 99999; 531 max: 15 99999;
618 color: 0 0 0 0; 532 color: 0 0 0 0;
619 } 533 }
620 } 534 }
621 part { name: "shadow_but"; mouse_events: 0; 535 rect { name: "base_but"; nomouse;
622 description { state: "default" 0.0; 536 description { state: "default" 0.0;
623 rel1.offset: -3 -2; 537 rel.to: "button";
624 rel1.to: "base_but"; 538 color: 51 153 255 255;
625 rel2.offset: 2 4;
626 rel2.to: "base_but";
627 image.normal: "shadow_square_tiny.png";
628 image.border: 6 6 6 6;
629 fill.smooth: 0;
630 } 539 }
631 description { state: "clicked" 0.0; 540 description { state: "clicked" 0.0;
632 inherit: "default" 0.0; 541 inherit: "default" 0.0;
633 rel1.offset: -2 -2; 542 color: 255 255 255 255;
634 rel2.offset: 1 1;
635 color: 255 255 255 128;
636 }
637 }
638 part { name: "glow_but"; mouse_events: 0;
639 description { state: "default" 0.0;
640 rel1.offset: -3 -3;
641 rel1.to: "base_but";
642 rel2.offset: 2 2;
643 rel2.to: "base_but";
644 image.normal: "glow_small.png";
645 image.border: 7 7 7 7;
646 fill.smooth: 0;
647 visible: 0;
648 } 543 }
649 description { state: "clicked" 0.0; 544 description { state: "disabled" 0.0;
650 inherit: "default" 0.0; 545 inherit: "default" 0.0;
651 visible: 1; 546 color: 64 64 64 255;
652 }
653 }
654 part { name: "base_but"; mouse_events: 0;
655 description { state: "default" 0.0;
656 rel1.to: "button";
657 rel2.to: "button";
658 image.normal: "vgrad_med_lighter.png";
659 fill.smooth: 0;
660 TILED_HORIZ(120)
661 }
662 }
663 part { name: "bevel_but"; mouse_events: 0;
664 description { state: "default" 0.0;
665 rel1.to: "base_but";
666 rel2.to: "base_but";
667 image.normal: "bevel_out.png";
668 image.border: 1 1 1 1;
669 image.middle: 0;
670 fill.smooth: 0;
671 } 547 }
672 } 548 }
673 part { name: "button_events"; type: RECT; 549 rect { name: "button_events";
674 dragable.events: "button"; 550 dragable.events: "button";
675 description { state: "default" 0.0; 551 description { state: "default" 0.0;
676 color: 0 0 0 0; 552 color: 0 0 0 0;
677 } 553 }
678 } 554 }
679 part { name: "clip"; type: RECT; 555 text { "efl.text"; nomouse;
680 description { state: "default" 0.0;
681 }
682 description { state: "disabled" 0.0;
683 inherit: "default" 0.0;
684 color: 255 255 255 64;
685 }
686 }
687 part { name: "efl.content"; type: SWALLOW;
688 scale: 1; 556 scale: 1;
689 clip_to: "clip"; 557 desc { "default";
690 description { state: "default" 0.0; 558 fixed: 0 1;
691 fixed: 1 0; 559 color: 160 160 160 255;
692 visible: 0; 560 rel1.offset: 0 4;
693 align: 0.0 0.5; 561 rel1.relative: 1.0 0.0;
694 max: 0 0; 562 rel1.to_x: "efl.content";
695 rel1.offset: 1 1; 563 rel2.offset: -5 -5;
696 rel2.offset: 1 -2;
697 rel2.relative: 0.0 1.0; 564 rel2.relative: 0.0 1.0;
698 } 565 rel2.to_x: "tog";
699 description { state: "visible" 0.0;
700 inherit: "default" 0.0;
701 fixed: 0 0;
702 visible: 1;
703 min: 16 16;
704 }
705 }
706 part { name: "sizer_content"; type: TEXT; mouse_events: 0;
707 scale: 1;
708 description { state: "default" 0.0;
709 fixed: 1 1;
710 visible: 0;
711 text { font: FN; size: 10; 566 text { font: FN; size: 10;
567 align: 0.5 0.5;
712 min: 0 0; 568 min: 0 0;
713 text_class: "check_text";
714 }
715 }
716 description { state: "visible" 0.0;
717 inherit: "default" 0.0;
718 rel1.to: "efl.content";
719 rel2.to: "efl.content";
720 text {
721 min: 1 1;
722 ellipsis: -1;
723 text: "M";
724 }
725 }
726 description { state: "icononly" 0.0;
727 inherit: "default" 0.0;
728 rel1.to: "efl.content";
729 rel2.to: "efl.content";
730 text {
731 min: 1 1;
732 ellipsis: -1;
733 text: "M";
734 } 569 }
570 visible: 0;
571 offscale;
735 } 572 }
736 } 573 desc { "visible"; inherit;
737 part { name: "efl.text"; type: TEXT; mouse_events: 0; 574 fixed: 0 0;
738 effect: SHADOW BOTTOM; 575 rel1.offset: 4 4;
739 scale: 1; 576 text.min: 1 1;
740 description { state: "default" 0.0; 577 text.ellipsis: -1;
741 rel1.to_x: "efl.content"; 578 visible: 1;
742 rel1.relative: 1.0 0.0;
743 rel1.offset: 2 2;
744 rel2.to_x: "tog";
745 rel2.relative: 0.0 1.0;
746 rel2.offset: -5 -3;
747 color: FN_COL_DEFAULT;
748 color_class: "check_text";
749 text { font: FN; size: 10;
750 min: 0 0;
751 align: 0.0 0.5;
752 text_class: "check";
753 }
754 } 579 }
755 description { state: "disabled" 0.0; 580 desc { "pressed_visible"; inherit;
756 inherit: "default" 0.0; 581 fixed: 0 0;
757 color_class: "check_text_disabled"; 582 color: 255 255 255 255;
758 color3: 255 255 255 255; 583 rel1.offset: 4 4;
584 text.min: 1 1;
585 text.ellipsis: -1;
586 visible: 1;
759 } 587 }
760 description { state: "visible" 0.0; 588 desc { "textonly"; inherit;
761 inherit: "default" 0.0; 589 fixed: 0 0;
590 text.min: 1 1;
591 text.ellipsis: -1;
762 visible: 1; 592 visible: 1;
593 }
594 desc { "pressed_textonly"; inherit;
595 fixed: 0 0;
596 color: 255 255 255 255;
763 text.min: 1 1; 597 text.min: 1 1;
764 text.ellipsis: -1; 598 text.ellipsis: -1;
599 visible: 1;
765 } 600 }
766 description { state: "disabled_visible" 0.0; 601 desc { "disabled_visible"; inherit;
767 inherit: "default" 0.0; 602 fixed: 0 0;
768 color_class: "check_text_disabled"; 603 color: 96 96 96 255;
769 color3: 255 255 255 255; 604 rel1.offset: 4 4;
605 text.min: 1 1;
606 text.ellipsis: -1;
770 visible: 1; 607 visible: 1;
608 }
609 desc { "disabled_textonly"; inherit;
610 fixed: 0 0;
611 color: 96 96 96 255;
771 text.min: 1 1; 612 text.min: 1 1;
772 text.ellipsis: -1; 613 text.ellipsis: -1;
614 visible: 1;
773 } 615 }
774 } 616 }
775 part { name: "event"; type: RECT; 617 rect { "event2";
776 ignore_flags: ON_HOLD; 618 desc { "default";
777 description { state: "default" 0.0;
778 color: 0 0 0 0; 619 color: 0 0 0 0;
779 rel1.to_x: "efl.content";
780 rel2.to_x: "efl.text";
781 }
782 description { state: "disabled" 0.0;
783 inherit: "default" 0.0;
784 visible: 0; 620 visible: 0;
785 } 621 }
622 desc { "disabled"; inherit;
623 visible: 1;
624 }
786 } 625 }
787 part { name: "event2"; type: RECT; 626 rect { "event"; repeat;
788 ignore_flags: ON_HOLD; 627 ignore_flags: ON_HOLD;
789 description { state: "default" 0.0; 628 desc { "default";
790 color: 0 0 0 0; 629 color: 0 0 0 0;
791 visible: 0;
792 } 630 }
793 description { state: "disabled" 0.0; 631 desc { "disabled"; inherit;
794 inherit: "default" 0.0; 632 visible: 0;
795 visible: 1;
796 } 633 }
797 } 634 }
798 } 635 }
799 programs { 636 programs {
800 EFL_UI_CLICKABLE_PART_BIND(event) 637 EFL_UI_CLICKABLE_PART_BIND("event")
801 program { 638 program { signal: "efl,state,selected"; source: "efl";
802 signal: "efl,state,selected"; source: "efl";
803 script { 639 script {
804 new Float:drag; 640 new Float:drag;
805 if (get_int(is_rtl) == 0) { 641 if (get_int(is_rtl) == 0) { drag = 100.0; }
806 drag = 100.0; 642 else { drag = 0.0; }
807 } else {
808 drag = 0.0;
809 }
810 set_drag(PART:"button", drag, 0.0); 643 set_drag(PART:"button", drag, 0.0);
811 } 644 }
812 } 645 }
813 program { 646 program { signal: "efl,state,unselected"; source: "efl";
814 signal: "efl,state,unselected"; source: "efl";
815 script { 647 script {
816 new Float:drag; 648 new Float:drag;
817 if (get_int(is_rtl) == 0) { 649 if (get_int(is_rtl) == 0) { drag = 0.0; }
818 drag = 0.0; 650 else { drag = 100.0; }
819 } else {
820 drag = 100.0;
821 }
822 set_drag(PART:"button", drag, 0.0); 651 set_drag(PART:"button", drag, 0.0);
823 } 652 }
824 } 653 }
825 program { 654 program { signal: "mouse,clicked,1"; source: "button";
826 signal: "mouse,clicked,1"; source: "button";
827 script { 655 script {
828 new Float:dx, Float:dy; 656 new Float:dx, Float:dy;
829 get_drag(PART:"button", dx, dy); 657 get_drag(PART:"button", dx, dy);
@@ -842,21 +670,18 @@ group { "efl/check:toggle"; data.item: "version" "123";
842 } 670 }
843 } 671 }
844 } 672 }
845 program { 673 program { signal: "drag"; source: "button";
846 signal: "drag"; source: "button";
847 script { 674 script {
848 set_int(is_drag, 1); 675 set_int(is_drag, 1);
849 } 676 }
850 } 677 }
851 program { 678 program { signal: "mouse,down,1"; source: "button";
852 signal: "mouse,down,1"; source: "button";
853 script { 679 script {
854 set_int(was_drag, 0); 680 set_int(was_drag, 0);
855 set_int(is_drag, 0); 681 set_int(is_drag, 0);
856 } 682 }
857 } 683 }
858 program { name: "drag_end"; 684 program { signal: "mouse,up,1"; source: "button";
859 signal: "mouse,up,1"; source: "button";
860 script { 685 script {
861 new Float:dx, Float:dy; 686 new Float:dx, Float:dy;
862 get_drag(PART:"button", dx, dy); 687 get_drag(PART:"button", dx, dy);
@@ -877,81 +702,45 @@ group { "efl/check:toggle"; data.item: "version" "123";
877 } 702 }
878 } 703 }
879 } 704 }
880 program { 705 program { signal: "mouse,down,1"; source: "button";
881 signal: "mouse,down,1"; source: "button";
882 action: STATE_SET "clicked" 0.0; 706 action: STATE_SET "clicked" 0.0;
883 target: "shadow_but"; 707 target: "base_but";
884 target: "glow_but"; 708 target: "efl.ontext";
709 target: "efl.offtext";
885 } 710 }
886 program { 711 program { signal: "mouse,up,1"; source: "button";
887 signal: "mouse,up,1"; source: "button";
888 action: STATE_SET "default" 0.0; 712 action: STATE_SET "default" 0.0;
889 target: "shadow_but"; 713 target: "base_but";
890 target: "glow_but"; 714 target: "efl.ontext";
715 target: "efl.offtext";
891 } 716 }
892 program { 717 program { signal: "efl,text,set"; source: "efl";
893 signal: "efl,text,set"; source: "efl"; 718 script { flag_set(LABEL); }
894 script {
895 new m = get_int(btmode);
896 m |= LABEL; set_int(btmode, m);
897 eval_mode(m);
898 }
899 } 719 }
900 program { 720 program { signal: "efl,text,unset"; source: "efl";
901 signal: "efl,text,unset"; source: "efl"; 721 script { flag_unset(LABEL); }
902 script {
903 new m = get_int(btmode);
904 m &= ~LABEL; set_int(btmode, m);
905 eval_mode(m);
906 }
907 } 722 }
908 program { 723 program { signal: "efl,content,set"; source: "efl";
909 signal: "efl,content,set"; source: "efl"; 724 script { flag_set(ICON); }
910 script {
911 new m = get_int(btmode);
912 m |= ICON; set_int(btmode, m);
913 eval_mode(m);
914 }
915 } 725 }
916 program { 726 program { signal: "efl,content,unset"; source: "efl";
917 signal: "efl,content,unset"; source: "efl"; 727 script { flag_unset(ICON); }
918 script {
919 new m = get_int(btmode);
920 m &= ~ICON; set_int(btmode, m);
921 eval_mode(m);
922 }
923 } 728 }
924 program { 729 program { signal: "efl,state,disabled"; source: "efl";
925 signal: "efl,state,disabled"; source: "efl"; 730 script { flag_set(DISABLE); }
926 script {
927 new m = get_int(btmode);
928 m |= DISABLE; set_int(btmode, m);
929 eval_mode(m);
930 }
931 } 731 }
932 program { 732 program { signal: "efl,state,enabled"; source: "efl";
933 signal: "efl,state,enabled"; source: "efl"; 733 script { flag_unset(DISABLE); }
934 script {
935 new m = get_int(btmode);
936 m &= ~DISABLE; set_int(btmode, m);
937 eval_mode(m);
938 }
939 } 734 }
940 program { 735 program { signal: "edje,state,rtl"; source: "edje";
941 signal: "edje,state,rtl"; source: "edje";
942 script { 736 script {
943 set_int(is_rtl, 1); 737 set_int(is_rtl, 1);
944 } 738 }
945 } 739 }
946 program { 740 program { signal: "edje,state,ltr"; source: "edje";
947 signal: "edje,state,ltr"; source: "edje";
948 script { 741 script {
949 set_int(is_rtl, 0); 742 set_int(is_rtl, 0);
950 } 743 }
951 } 744 }
952 } 745 }
953#undef ICON
954#undef LABEL
955#undef MASK
956#undef DISABLE
957} 746}
diff --git a/data/elementary/themes/edc/elm/check.edc b/data/elementary/themes/edc/elm/check.edc
index 11226d2195..c2bb5ddb99 100644
--- a/data/elementary/themes/edc/elm/check.edc
+++ b/data/elementary/themes/edc/elm/check.edc
@@ -326,7 +326,6 @@ group { name: "elm/check/base/default";
326} 326}
327 327
328group { name: "elm/check/base/toggle"; 328group { name: "elm/check/base/toggle";
329 images.image: "check.png" COMP;
330 script { 329 script {
331 public is_drag; 330 public is_drag;
332 public was_drag; 331 public was_drag;
diff --git a/data/elementary/themes/macros.edc b/data/elementary/themes/macros.edc
index 8fe990d451..f34b71ddec 100644
--- a/data/elementary/themes/macros.edc
+++ b/data/elementary/themes/macros.edc
@@ -373,3 +373,103 @@
373 new m = get_int(btmode) & ~flag; \ 373 new m = get_int(btmode) & ~flag; \
374 set_int(btmode, m); eval_mode(m); \ 374 set_int(btmode, m); eval_mode(m); \
375 } 375 }
376#define BUTTONMODE_SCRIPT2 \
377 public btmode; \
378 public eval_mode(m) { \
379 new m1 = m & MASK; \
380 new d = m & DISABLE; \
381 new p = m & PRESSED; \
382 new bg = m & BACKGROUND; \
383 if (bg) { \
384 set_state(PART:"base", "hidden", 0.0); \
385 set_state(PART:"efl.background", "visible", 0.0); \
386 } else { \
387 set_state(PART:"efl.background", "default", 0.0); \
388 if (!d) { \
389 if (!p) { \
390 set_state(PART:"base", "default", 0.0); \
391 set_state(PART:"shadow", "default", 0.0); \
392 } else { \
393 set_state(PART:"base", "pressed", 0.0); \
394 set_state(PART:"shadow", "pressed", 0.0); \
395 } \
396 } else { \
397 set_state(PART:"base", "disabled", 0.0); \
398 set_state(PART:"shadow", "disabled", 0.0); \
399 } \
400 } \
401 if (m1 == (ICON | LABEL)) { \
402 if (!d) { \
403 set_state(PART:"efl.content", "visible", 0.0); \
404 set_state(PART:"sizer_content", "visible", 0.0); \
405 set_state(PART:"event", "default", 0.0); \
406 if (!p) { \
407 set_state(PART:"efl.text", "visible", 0.0); \
408 set_state(PART:"icon_clip", "default", 0.0); \
409 } else { \
410 set_state(PART:"efl.text", "pressed_visible", 0.0); \
411 set_state(PART:"icon_clip", "pressed", 0.0); \
412 } \
413 } else { \
414 set_state(PART:"efl.content", "visible", 0.0); \
415 set_state(PART:"sizer_content", "visible", 0.0); \
416 set_state(PART:"efl.text", "disabled_visible", 0.0); \
417 set_state(PART:"icon_clip", "disabled", 0.0); \
418 set_state(PART:"event", "disabled", 0.0); \
419 } \
420 } else if (m1 == (ICON)) { \
421 if (!d) { \
422 set_state(PART:"efl.content", "icononly", 0.0); \
423 set_state(PART:"sizer_content", "icononly", 0.0); \
424 set_state(PART:"event", "default", 0.0); \
425 set_state(PART:"efl.text", "default", 0.0); \
426 if (!p) \
427 set_state(PART:"icon_clip", "default", 0.0); \
428 else \
429 set_state(PART:"icon_clip", "pressed", 0.0); \
430 } else { \
431 set_state(PART:"efl.content", "icononly", 0.0); \
432 set_state(PART:"sizer_content", "icononly", 0.0); \
433 set_state(PART:"efl.text", "default", 0.0); \
434 set_state(PART:"icon_clip", "disabled", 0.0); \
435 set_state(PART:"event", "disabled", 0.0); \
436 } \
437 } else if (m1 == (LABEL)) { \
438 if (!d) { \
439 set_state(PART:"efl.content", "default", 0.0); \
440 set_state(PART:"sizer_content", "default", 0.0); \
441 set_state(PART:"icon_clip", "default", 0.0); \
442 set_state(PART:"event", "default", 0.0); \
443 if (!p) \
444 set_state(PART:"efl.text", "textonly", 0.0); \
445 else \
446 set_state(PART:"efl.text", "pressed_textonly", 0.0); \
447 } else { \
448 set_state(PART:"efl.content", "default", 0.0); \
449 set_state(PART:"sizer_content", "default", 0.0); \
450 set_state(PART:"efl.text", "disabled_textonly", 0.0); \
451 set_state(PART:"icon_clip", "disabled", 0.0); \
452 set_state(PART:"event", "disabled", 0.0); \
453 } \
454 } else { \
455 if (!d) { \
456 set_state(PART:"efl.content", "default", 0.0); \
457 set_state(PART:"sizer_content", "default", 0.0); \
458 set_state(PART:"icon_clip", "default", 0.0); \
459 set_state(PART:"event", "default", 0.0); \
460 } else { \
461 set_state(PART:"efl.content", "default", 0.0); \
462 set_state(PART:"sizer_content", "default", 0.0); \
463 set_state(PART:"icon_clip", "disabled", 0.0); \
464 set_state(PART:"event", "disabled", 0.0); \
465 } \
466 } \
467 } \
468 flag_set(flag) { \
469 new m = get_int(btmode) | flag; \
470 set_int(btmode, m); eval_mode(m); \
471 } \
472 flag_unset(flag) { \
473 new m = get_int(btmode) & ~flag; \
474 set_int(btmode, m); eval_mode(m); \
475 }