summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-10-12 16:02:33 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-10-12 16:02:33 +0000
commit03651d0fcbea90dbf054a745e7a3fc315d547b09 (patch)
treed600caa2065dc231fe4acc10710b39e89719a8d7 /data
parent248f977318b83a7b7cd2c715c464a077478d7cd7 (diff)
and now all the internal widgets understand keyboard focus and control.
dialog now uses internal widgets for buttons. SVN revision: 17464
Diffstat (limited to 'data')
-rw-r--r--data/themes/default_button.edc45
-rw-r--r--data/themes/default_check.edc40
-rw-r--r--data/themes/default_dialog.edc546
-rw-r--r--data/themes/default_radio.edc40
-rw-r--r--data/themes/images/focus.pngbin207 -> 694 bytes
5 files changed, 123 insertions, 548 deletions
diff --git a/data/themes/default_button.edc b/data/themes/default_button.edc
index 69d99ba9d..6196efe57 100644
--- a/data/themes/default_button.edc
+++ b/data/themes/default_button.edc
@@ -4,6 +4,7 @@ images {
4 image: "e17_titlebar_glint1.png" COMP; 4 image: "e17_titlebar_glint1.png" COMP;
5 image: "e17_titlebar_glint2.png" COMP; 5 image: "e17_titlebar_glint2.png" COMP;
6 image: "e17_titlebar_glint3.png" COMP; 6 image: "e17_titlebar_glint3.png" COMP;
7 image: "focus.png" COMP;
7} 8}
8 9
9group { 10group {
@@ -15,6 +16,7 @@ group {
15 mouse_events: 1; 16 mouse_events: 1;
16 description { 17 description {
17 state: "default" 0.0; 18 state: "default" 0.0;
19 min: 64 16;
18 image { 20 image {
19 normal: "e17_button.png"; 21 normal: "e17_button.png";
20 border: 8 8 8 8; 22 border: 8 8 8 8;
@@ -37,12 +39,12 @@ group {
37 color: 0 0 0 0; 39 color: 0 0 0 0;
38 rel1 { 40 rel1 {
39 relative: 0.0 0.0; 41 relative: 0.0 0.0;
40 offset: 0 11; 42 offset: 7 11;
41 to: "button_image"; 43 to: "button_image";
42 } 44 }
43 rel2 { 45 rel2 {
44 relative: 0.0 1.0; 46 relative: 0.0 1.0;
45 offset: 0 -12; 47 offset: 6 -12;
46 to: "button_image"; 48 to: "button_image";
47 } 49 }
48 } 50 }
@@ -245,6 +247,29 @@ group {
245 color: 255 255 255 255; 247 color: 255 255 255 255;
246 } 248 }
247 } 249 }
250 part {
251 name: "focus";
252 mouse_events: 0;
253 description {
254 state: "default" 0.0;
255 visible: 0;
256 color: 255 255 255 0;
257 image {
258 normal: "focus.png";
259 border: 7 7 7 7;
260 middle: 0;
261 }
262 fill {
263 smooth: 0;
264 }
265 }
266 description {
267 state: "focused" 0.0;
268 inherit: "default" 0.0;
269 visible: 1;
270 color: 255 255 255 255;
271 }
272 }
248 } 273 }
249 programs { 274 programs {
250 program { 275 program {
@@ -331,5 +356,21 @@ group {
331 target: "glint2"; 356 target: "glint2";
332 target: "glint3"; 357 target: "glint3";
333 } 358 }
359 program {
360 name: "focus_in";
361 signal: "focus_in";
362 source: "";
363 action: STATE_SET "focused" 0.0;
364 transition: DECELERATE 0.2;
365 target: "focus";
366 }
367 program {
368 name: "focus_out";
369 signal: "focus_out";
370 source: "";
371 action: STATE_SET "default" 0.0;
372 transition: ACCELERATE 0.5;
373 target: "focus";
374 }
334 } 375 }
335} 376}
diff --git a/data/themes/default_check.edc b/data/themes/default_check.edc
index 424c12160..a881109cf 100644
--- a/data/themes/default_check.edc
+++ b/data/themes/default_check.edc
@@ -1,6 +1,7 @@
1images { 1images {
2 image: "e17_menu_check1.png" COMP; 2 image: "e17_menu_check1.png" COMP;
3 image: "e17_menu_check2.png" COMP; 3 image: "e17_menu_check2.png" COMP;
4 image: "focus.png" COMP;
4} 5}
5group { 6group {
6 name: "widgets/check"; 7 name: "widgets/check";
@@ -89,6 +90,29 @@ group {
89 color: 0 0 0 0; 90 color: 0 0 0 0;
90 } 91 }
91 } 92 }
93 part {
94 name: "focus";
95 mouse_events: 0;
96 description {
97 state: "default" 0.0;
98 visible: 0;
99 color: 255 255 255 0;
100 image {
101 normal: "focus.png";
102 border: 7 7 7 7;
103 middle: 0;
104 }
105 fill {
106 smooth: 0;
107 }
108 }
109 description {
110 state: "focused" 0.0;
111 inherit: "default" 0.0;
112 visible: 1;
113 color: 255 255 255 255;
114 }
115 }
92 } 116 }
93 programs { 117 programs {
94 program { 118 program {
@@ -124,5 +148,21 @@ group {
124 } 148 }
125 } 149 }
126 } 150 }
151 program {
152 name: "focus_in";
153 signal: "focus_in";
154 source: "";
155 action: STATE_SET "focused" 0.0;
156 transition: DECELERATE 0.2;
157 target: "focus";
158 }
159 program {
160 name: "focus_out";
161 signal: "focus_out";
162 source: "";
163 action: STATE_SET "default" 0.0;
164 transition: ACCELERATE 0.5;
165 target: "focus";
166 }
127 } 167 }
128} 168}
diff --git a/data/themes/default_dialog.edc b/data/themes/default_dialog.edc
index 7de4b3503..160029194 100644
--- a/data/themes/default_dialog.edc
+++ b/data/themes/default_dialog.edc
@@ -1,158 +1,7 @@
1#define FOCUS_COLOR 255 255 255 200
2
3#define FOCUS_RECT(x1, y1, x2, y2, offx1, offy1, offx2, offy2) \
4part { \
5 name: "focus_rect_top"; \
6 mouse_events: 0; \
7 description { \
8 state: "default" 0.0; \
9 visible: 0; \
10 color: FOCUS_COLOR; \
11 rel1 { \
12 relative: x1 y1; \
13 offset: offx1 offy1; \
14 } \
15 rel2 { \
16 relative: x2 y1; \
17 offset: offx2 offy1; \
18 } \
19 image { \
20 normal: "focus.png"; \
21 } \
22 fill { \
23 smooth: 0; \
24 size { \
25 relative: 0 0; \
26 offset: 32 32; \
27 } \
28 } \
29 } \
30 description { \
31 state: "focused" 0.0; \
32 inherit: "default" 0.0; \
33 visible: 1; \
34 } \
35} \
36part { \
37 name: "focus_rect_bottom"; \
38 mouse_events: 0; \
39 description { \
40 state: "default" 0.0; \
41 visible: 0; \
42 color: FOCUS_COLOR; \
43 rel1 { \
44 relative: x1 y2; \
45 offset: offx1 offy2; \
46 } \
47 rel2 { \
48 relative: x2 y2; \
49 offset: offx2 offy2; \
50 } \
51 image { \
52 normal: "focus.png"; \
53 } \
54 fill { \
55 smooth: 0; \
56 size { \
57 relative: 0 0; \
58 offset: 32 32; \
59 } \
60 } \
61 } \
62 description { \
63 state: "focused" 0.0; \
64 inherit: "default" 0.0; \
65 visible: 1; \
66 } \
67} \
68part { \
69 name: "focus_rect_left"; \
70 mouse_events: 0; \
71 description { \
72 state: "default" 0.0; \
73 visible: 0; \
74 color: FOCUS_COLOR; \
75 rel1 { \
76 relative: x1 y1; \
77 offset: offx1 (offy1 + 1); \
78 } \
79 rel2 { \
80 relative: x1 y2; \
81 offset: offx1 (offy2 - 1); \
82 } \
83 image { \
84 normal: "focus.png"; \
85 } \
86 fill { \
87 smooth: 0; \
88 size { \
89 relative: 0 0; \
90 offset: 32 32; \
91 } \
92 } \
93 } \
94 description { \
95 state: "focused" 0.0; \
96 inherit: "default" 0.0; \
97 visible: 1; \
98 } \
99} \
100part { \
101 name: "focus_rect_right"; \
102 mouse_events: 0; \
103 description { \
104 state: "default" 0.0; \
105 visible: 0; \
106 color: FOCUS_COLOR; \
107 rel1 { \
108 relative: x2 y1; \
109 offset: offx2 (offy1 + 1); \
110 } \
111 rel2 { \
112 relative: x2 y2; \
113 offset: offx2 (offy2 - 1); \
114 } \
115 image { \
116 normal: "focus.png"; \
117 } \
118 fill { \
119 smooth: 0; \
120 size { \
121 relative: 0 0; \
122 offset: 32 32; \
123 } \
124 } \
125 } \
126 description { \
127 state: "focused" 0.0; \
128 inherit: "default" 0.0; \
129 visible: 1; \
130 } \
131}
132
133#define FOCUS_ACTION \
134action: STATE_SET "focused" 0.0; \
135target: "focus_rect_top"; \
136target: "focus_rect_bottom"; \
137target: "focus_rect_left"; \
138target: "focus_rect_right";
139
140#define UNFOCUS_ACTION \
141action: STATE_SET "default" 0.0; \
142target: "focus_rect_top"; \
143target: "focus_rect_bottom"; \
144target: "focus_rect_left"; \
145target: "focus_rect_right";
146
147images { 1images {
148 image: "e17_menu_bg_border.png" COMP; 2 image: "e17_menu_bg_border.png" COMP;
149// image: "e17_menu_bg.png" COMP;
150// image: "e17_winlist_top.png" COMP;
151 image: "e17_winlist_bottom.png" COMP; 3 image: "e17_winlist_bottom.png" COMP;
152 image: "e17_button2.png" COMP;
153 image: "e17_button.png" COMP;
154 image: "e17_dialog_watermark.png" COMP; 4 image: "e17_dialog_watermark.png" COMP;
155 image: "focus.png" COMP;
156} 5}
157 6
158styles 7styles
@@ -178,7 +27,6 @@ group {
178 rel1 { 27 rel1 {
179 relative: 0.0 0.0; 28 relative: 0.0 0.0;
180 offset: 1 1; 29 offset: 1 1;
181// to_y: "base2";
182 } 30 }
183 rel2 { 31 rel2 {
184 relative: 1.0 1.0; 32 relative: 1.0 1.0;
@@ -209,31 +57,6 @@ group {
209 } 57 }
210 } 58 }
211 } 59 }
212 /*
213 part {
214 name: "base2";
215 mouse_events: 0;
216 description {
217 state: "default" 0.0;
218 max: 99999 48;
219 align: 0.5 0.0;
220 rel1 {
221 relative: 0.0 0.0;
222 offset: 1 1;
223 }
224 rel2 {
225 relative: 1.0 1.0;
226 offset: -2 -2;
227 }
228 image {
229 normal: "e17_menu_bg.png";
230 }
231 fill {
232 smooth: 0;
233 }
234 }
235 }
236 */
237 part { 60 part {
238 name: "base3"; 61 name: "base3";
239 mouse_events: 0; 62 mouse_events: 0;
@@ -294,31 +117,6 @@ group {
294 } 117 }
295 } 118 }
296 } 119 }
297/*
298 part {
299 name: "top";
300 mouse_events: 0;
301 description {
302 state: "default" 0.0;
303 rel1 {
304 relative: 0.0 0.0;
305 offset: 1 1;
306 }
307 rel2 {
308 relative: 1.0 0.0;
309 offset: -2 16;
310 to_y: "content_swallow";
311 }
312 image {
313 normal: "e17_winlist_top.png";
314 border: 0 0 0 19;
315 }
316 fill {
317 smooth: 0;
318 }
319 }
320 }
321 */
322 part { 120 part {
323 name: "bottom"; 121 name: "bottom";
324 mouse_events: 0; 122 mouse_events: 0;
@@ -364,350 +162,6 @@ group {
364} 162}
365 163
366group { 164group {
367 name: "widgets/dialog/button";
368 parts {
369 part {
370 name: "button_image";
371 type: IMAGE;
372 mouse_events: 1;
373 description {
374 state: "default" 0.0;
375 min: 64 32;
376 image {
377 normal: "e17_button.png";
378 border: 8 8 8 8;
379 }
380 }
381 description {
382 state: "clicked" 0.0;
383 min: 64 32;
384 image {
385 normal: "e17_button2.png";
386 border: 8 8 8 8;
387 }
388 }
389 }
390 part {
391 name: "icon_swallow";
392 type: SWALLOW;
393 description {
394 state: "default" 0.0;
395 align: 0.0 0.5;
396 color: 0 0 0 0;
397 rel1 {
398 relative: 0.0 0.0;
399 offset: 0 0;
400 to: "button_image";
401 }
402 rel2 {
403 relative: 0.0 1.0;
404 offset: 0 -7;
405 to: "button_image";
406 }
407 }
408 description {
409 state: "visible" 0.0;
410 inherit: "default" 0.0;
411 aspect: 1.0 1.0;
412 aspect_preference: VERTICAL;
413 align: 0.0 0.5;
414 color: 0 0 0 0;
415 rel1 {
416 relative: 0.0 0.0;
417 offset: 6 6;
418 to: "button_image";
419 }
420 rel2 {
421 relative: 0.0 1.0;
422 offset: 5 -7;
423 to: "button_image";
424 }
425 }
426 }
427 part {
428 name: "button_text";
429 type: TEXT;
430 effect: SHADOW;
431 mouse_events: 0;
432 description {
433 state: "default" 0.0;
434 rel1 {
435 relative: 1.0 0.0;
436 offset: 6 6;
437 to_x: "icon_swallow";
438 to_y: "button_image";
439 }
440 rel2 {
441 relative: 1.0 1.0;
442 offset: -7 -7;
443 to: "button_image";
444 }
445 color: 0 0 0 255;
446 color3: 255 255 255 128;
447 text {
448 text: "OK";
449 font: "Edje-Vera";
450 size: 10;
451 min: 1 1;
452 align: 0.5 0.5;
453 }
454 }
455 }
456 part {
457 name: "glint_clip";
458 type: RECT;
459 mouse_events: 0;
460 description {
461 state: "default" 0.0;
462 color: 255 255 255 255;
463 rel1 {
464 relative: 0.0 0.0;
465 offset: 3 3;
466 }
467 rel2 {
468 relative: 1.0 1.0;
469 offset: -4 -4;
470 }
471 }
472 }
473 part {
474 name: "glint1";
475 mouse_events: 0;
476 description {
477 state: "default" 0.0;
478 visible: 0;
479 color: 255 255 255 0;
480 align: 0.0 0.0;
481 max: 34 13;
482 rel1 {
483 relative: 0.0 0.0;
484 offset: 2 2;
485 }
486 rel2 {
487 relative: 1.0 1.0;
488 offset: -3 -3;
489 }
490 image {
491 normal: "e17_titlebar_glint1.png";
492 border: 5 0 5 0;
493 }
494 fill {
495 smooth: 0;
496 }
497 }
498 description {
499 state: "active" 0.0;
500 inherit: "default" 0.0;
501 visible: 1;
502 color: 255 255 255 255;
503 }
504 }
505 part {
506 name: "glint2";
507 mouse_events: 0;
508 clip_to: "glint_clip";
509 description {
510 state: "default" 0.0;
511 visible: 0;
512 color: 255 255 255 0;
513 align: 1.0 0.5;
514 max: 0 0;
515 rel1 {
516 relative: 0.0 0.0;
517 offset: 3 3;
518 }
519 rel2 {
520 relative: 0.0 1.0;
521 offset: 3 -4;
522 }
523 image {
524 normal: "e17_titlebar_glint2.png";
525 border: 0 0 5 5;
526 }
527 fill {
528 smooth: 0;
529 }
530 }
531 description {
532 state: "active" 0.0;
533 inherit: "default" 0.0;
534 visible: 1;
535 color: 255 255 255 255;
536 max: 169 9999;
537 min: 169 8;
538 align: 0.5 0.5;
539 }
540 description {
541 state: "active2" 0.0;
542 inherit: "default" 0.0;
543 visible: 1;
544 color: 255 255 255 128;
545 max: 169 9999;
546 min: 169 8;
547 align: 0.5 0.5;
548 rel1 {
549 relative: 1.0 0.0;
550 offset: -4 3;
551 }
552 rel2 {
553 relative: 1.0 1.0;
554 offset: -4 -4;
555 }
556 }
557 description {
558 state: "active3" 0.0;
559 inherit: "default" 0.0;
560 visible: 0;
561 color: 255 255 255 0;
562 max: 169 9999;
563 min: 169 8;
564 align: 0.0 0.5;
565 rel1 {
566 relative: 1.0 0.0;
567 offset: -4 3;
568 }
569 rel2 {
570 relative: 1.0 1.0;
571 offset: -4 -4;
572 }
573 }
574 }
575 part {
576 name: "glint3";
577 mouse_events: 0;
578 description {
579 state: "default" 0.0;
580 visible: 0;
581 color: 255 255 255 0;
582 align: 1.0 1.0;
583 max: 34 13;
584 rel1 {
585 relative: 0.0 0.0;
586 offset: 2 2;
587 }
588 rel2 {
589 relative: 1.0 1.0;
590 offset: -3 -3;
591 }
592 image {
593 normal: "e17_titlebar_glint3.png";
594 border: 0 5 0 5;
595 }
596 fill {
597 smooth: 0;
598 }
599 }
600 description {
601 state: "active" 0.0;
602 inherit: "default" 0.0;
603 visible: 1;
604 color: 255 255 255 255;
605 }
606 }
607
608 FOCUS_RECT(0.0, 0.0, 1.0, 1.0, 7, 7, -8, -8)
609 }
610 programs {
611 program {
612 name: "button_click";
613 signal: "mouse,down,1";
614 source: "button_image";
615 action: STATE_SET "clicked" 0.0;
616 target: "button_image";
617 }
618 program {
619 name: "button_unclick";
620 signal: "mouse,up,1";
621 source: "button_image";
622 action: STATE_SET "default" 0.0;
623 target: "button_image";
624 }
625 program {
626 name: "button_unclick2";
627 signal: "mouse,clicked,1";
628 source: "button_image";
629 action: SIGNAL_EMIT "click" "";
630 }
631 program {
632 name: "icon_visible";
633 signal: "icon_visible";
634 source: "";
635 action: STATE_SET "visible" 0.0;
636 target: "icon_swallow";
637 }
638 program {
639 name: "button_in";
640 signal: "mouse,in";
641 source: "button_image";
642 action: SIGNAL_EMIT "enter" "";
643 }
644 program {
645 name: "button_enter";
646 signal: "enter";
647 source: "";
648 script {
649 run_program(PROGRAM:"go_active");
650 }
651 }
652 program {
653 name: "go_active";
654 action: STATE_SET "active" 0.0;
655 target: "glint1";
656 target: "glint2";
657 transition: LINEAR 0.05;
658 after: "go_active2";
659 after: "go_active2b";
660 }
661 program {
662 name: "go_active2";
663 action: STATE_SET "active2" 0.0;
664 target: "glint2";
665 transition: LINEAR 0.2;
666 after: "go_active3";
667 after: "go_active3b";
668 }
669 program {
670 name: "go_active2b";
671 action: STATE_SET "active" 0.0;
672 target: "glint3";
673 transition: LINEAR 0.2;
674 }
675 program {
676 name: "go_active3";
677 action: STATE_SET "active3" 0.0;
678 target: "glint2";
679 transition: LINEAR 0.05;
680 }
681 program {
682 name: "go_active3b";
683 action: STATE_SET "default" 0.0;
684 target: "glint3";
685 transition: LINEAR 0.1;
686 after: "go_active4";
687 }
688 program {
689 name: "go_active4";
690 action: STATE_SET "default" 0.0;
691 target: "glint1";
692 target: "glint2";
693 target: "glint3";
694 }
695 program {
696 name: "button_focus";
697 signal: "focus";
698 source: "";
699 FOCUS_ACTION
700 }
701 program {
702 name: "button_unfocus";
703 signal: "unfocus";
704 source: "";
705 UNFOCUS_ACTION
706 }
707 }
708}
709
710group {
711 name: "widgets/dialog/text"; 165 name: "widgets/dialog/text";
712 parts { 166 parts {
713 part { 167 part {
diff --git a/data/themes/default_radio.edc b/data/themes/default_radio.edc
index 10959d11a..fa8f8079c 100644
--- a/data/themes/default_radio.edc
+++ b/data/themes/default_radio.edc
@@ -1,6 +1,7 @@
1images { 1images {
2 image: "e17_menu_radio1.png" COMP; 2 image: "e17_menu_radio1.png" COMP;
3 image: "e17_menu_radio2.png" COMP; 3 image: "e17_menu_radio2.png" COMP;
4 image: "focus.png" COMP;
4} 5}
5group { 6group {
6 name: "widgets/radio"; 7 name: "widgets/radio";
@@ -89,6 +90,29 @@ group {
89 color: 0 0 0 0; 90 color: 0 0 0 0;
90 } 91 }
91 } 92 }
93 part {
94 name: "focus";
95 mouse_events: 0;
96 description {
97 state: "default" 0.0;
98 visible: 0;
99 color: 255 255 255 0;
100 image {
101 normal: "focus.png";
102 border: 7 7 7 7;
103 middle: 0;
104 }
105 fill {
106 smooth: 0;
107 }
108 }
109 description {
110 state: "focused" 0.0;
111 inherit: "default" 0.0;
112 visible: 1;
113 color: 255 255 255 255;
114 }
115 }
92 } 116 }
93 programs { 117 programs {
94 program { 118 program {
@@ -117,5 +141,21 @@ group {
117 name: "click2"; 141 name: "click2";
118 action: SIGNAL_EMIT "toggled" "on"; 142 action: SIGNAL_EMIT "toggled" "on";
119 } 143 }
144 program {
145 name: "focus_in";
146 signal: "focus_in";
147 source: "";
148 action: STATE_SET "focused" 0.0;
149 transition: DECELERATE 0.2;
150 target: "focus";
151 }
152 program {
153 name: "focus_out";
154 signal: "focus_out";
155 source: "";
156 action: STATE_SET "default" 0.0;
157 transition: ACCELERATE 0.5;
158 target: "focus";
159 }
120 } 160 }
121} 161}
diff --git a/data/themes/images/focus.png b/data/themes/images/focus.png
index 114e04961..376e9455b 100644
--- a/data/themes/images/focus.png
+++ b/data/themes/images/focus.png
Binary files differ