Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/data/themes Modified Files: default_button.edc default_check.edc default_dialog.edc default_radio.edc Log Message: and now all the internal widgets understand keyboard focus and control. dialog now uses internal widgets for buttons. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_button.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- default_button.edc 11 Oct 2005 16:25:00 -0000 1.1 +++ default_button.edc 12 Oct 2005 16:02:33 -0000 1.2 @@ -4,6 +4,7 @@ image: "e17_titlebar_glint1.png" COMP; image: "e17_titlebar_glint2.png" COMP; image: "e17_titlebar_glint3.png" COMP; + image: "focus.png" COMP; } group { @@ -15,6 +16,7 @@ mouse_events: 1; description { state: "default" 0.0; + min: 64 16; image { normal: "e17_button.png"; border: 8 8 8 8; @@ -37,12 +39,12 @@ color: 0 0 0 0; rel1 { relative: 0.0 0.0; - offset: 0 11; + offset: 7 11; to: "button_image"; } rel2 { relative: 0.0 1.0; - offset: 0 -12; + offset: 6 -12; to: "button_image"; } } @@ -245,6 +247,29 @@ color: 255 255 255 255; } } + part { + name: "focus"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + image { + normal: "focus.png"; + border: 7 7 7 7; + middle: 0; + } + fill { + smooth: 0; + } + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } } programs { program { @@ -331,5 +356,21 @@ target: "glint2"; target: "glint3"; } + program { + name: "focus_in"; + signal: "focus_in"; + source: ""; + action: STATE_SET "focused" 0.0; + transition: DECELERATE 0.2; + target: "focus"; + } + program { + name: "focus_out"; + signal: "focus_out"; + source: ""; + action: STATE_SET "default" 0.0; + transition: ACCELERATE 0.5; + target: "focus"; + } } } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_check.edc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- default_check.edc 10 Oct 2005 15:27:51 -0000 1.2 +++ default_check.edc 12 Oct 2005 16:02:33 -0000 1.3 @@ -1,6 +1,7 @@ images { image: "e17_menu_check1.png" COMP; image: "e17_menu_check2.png" COMP; + image: "focus.png" COMP; } group { name: "widgets/check"; @@ -89,6 +90,29 @@ color: 0 0 0 0; } } + part { + name: "focus"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + image { + normal: "focus.png"; + border: 7 7 7 7; + middle: 0; + } + fill { + smooth: 0; + } + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } } programs { program { @@ -124,5 +148,21 @@ } } } + program { + name: "focus_in"; + signal: "focus_in"; + source: ""; + action: STATE_SET "focused" 0.0; + transition: DECELERATE 0.2; + target: "focus"; + } + program { + name: "focus_out"; + signal: "focus_out"; + source: ""; + action: STATE_SET "default" 0.0; + transition: ACCELERATE 0.5; + target: "focus"; + } } } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_dialog.edc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- default_dialog.edc 11 Oct 2005 16:25:00 -0000 1.12 +++ default_dialog.edc 12 Oct 2005 16:02:33 -0000 1.13 @@ -1,158 +1,7 @@ -#define FOCUS_COLOR 255 255 255 200 - -#define FOCUS_RECT(x1, y1, x2, y2, offx1, offy1, offx2, offy2) \ -part { \ - name: "focus_rect_top"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - visible: 0; \ - color: FOCUS_COLOR; \ - rel1 { \ - relative: x1 y1; \ - offset: offx1 offy1; \ - } \ - rel2 { \ - relative: x2 y1; \ - offset: offx2 offy1; \ - } \ - image { \ - normal: "focus.png"; \ - } \ - fill { \ - smooth: 0; \ - size { \ - relative: 0 0; \ - offset: 32 32; \ - } \ - } \ - } \ - description { \ - state: "focused" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - } \ -} \ -part { \ - name: "focus_rect_bottom"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - visible: 0; \ - color: FOCUS_COLOR; \ - rel1 { \ - relative: x1 y2; \ - offset: offx1 offy2; \ - } \ - rel2 { \ - relative: x2 y2; \ - offset: offx2 offy2; \ - } \ - image { \ - normal: "focus.png"; \ - } \ - fill { \ - smooth: 0; \ - size { \ - relative: 0 0; \ - offset: 32 32; \ - } \ - } \ - } \ - description { \ - state: "focused" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - } \ -} \ -part { \ - name: "focus_rect_left"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - visible: 0; \ - color: FOCUS_COLOR; \ - rel1 { \ - relative: x1 y1; \ - offset: offx1 (offy1 + 1); \ - } \ - rel2 { \ - relative: x1 y2; \ - offset: offx1 (offy2 - 1); \ - } \ - image { \ - normal: "focus.png"; \ - } \ - fill { \ - smooth: 0; \ - size { \ - relative: 0 0; \ - offset: 32 32; \ - } \ - } \ - } \ - description { \ - state: "focused" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - } \ -} \ -part { \ - name: "focus_rect_right"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - visible: 0; \ - color: FOCUS_COLOR; \ - rel1 { \ - relative: x2 y1; \ - offset: offx2 (offy1 + 1); \ - } \ - rel2 { \ - relative: x2 y2; \ - offset: offx2 (offy2 - 1); \ - } \ - image { \ - normal: "focus.png"; \ - } \ - fill { \ - smooth: 0; \ - size { \ - relative: 0 0; \ - offset: 32 32; \ - } \ - } \ - } \ - description { \ - state: "focused" 0.0; \ - inherit: "default" 0.0; \ - visible: 1; \ - } \ -} - -#define FOCUS_ACTION \ -action: STATE_SET "focused" 0.0; \ -target: "focus_rect_top"; \ -target: "focus_rect_bottom"; \ -target: "focus_rect_left"; \ -target: "focus_rect_right"; - -#define UNFOCUS_ACTION \ -action: STATE_SET "default" 0.0; \ -target: "focus_rect_top"; \ -target: "focus_rect_bottom"; \ -target: "focus_rect_left"; \ -target: "focus_rect_right"; - images { image: "e17_menu_bg_border.png" COMP; -// image: "e17_menu_bg.png" COMP; -// image: "e17_winlist_top.png" COMP; image: "e17_winlist_bottom.png" COMP; - image: "e17_button2.png" COMP; - image: "e17_button.png" COMP; image: "e17_dialog_watermark.png" COMP; - image: "focus.png" COMP; } styles @@ -178,7 +27,6 @@ rel1 { relative: 0.0 0.0; offset: 1 1; -// to_y: "base2"; } rel2 { relative: 1.0 1.0; @@ -209,31 +57,6 @@ } } } - /* - part { - name: "base2"; - mouse_events: 0; - description { - state: "default" 0.0; - max: 99999 48; - align: 0.5 0.0; - rel1 { - relative: 0.0 0.0; - offset: 1 1; - } - rel2 { - relative: 1.0 1.0; - offset: -2 -2; - } - image { - normal: "e17_menu_bg.png"; - } - fill { - smooth: 0; - } - } - } - */ part { name: "base3"; mouse_events: 0; @@ -294,31 +117,6 @@ } } } -/* - part { - name: "top"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: 1 1; - } - rel2 { - relative: 1.0 0.0; - offset: -2 16; - to_y: "content_swallow"; - } - image { - normal: "e17_winlist_top.png"; - border: 0 0 0 19; - } - fill { - smooth: 0; - } - } - } - */ part { name: "bottom"; mouse_events: 0; @@ -364,350 +162,6 @@ } group { - name: "widgets/dialog/button"; - parts { - part { - name: "button_image"; - type: IMAGE; - mouse_events: 1; - description { - state: "default" 0.0; - min: 64 32; - image { - normal: "e17_button.png"; - border: 8 8 8 8; - } - } - description { - state: "clicked" 0.0; - min: 64 32; - image { - normal: "e17_button2.png"; - border: 8 8 8 8; - } - } - } - part { - name: "icon_swallow"; - type: SWALLOW; - description { - state: "default" 0.0; - align: 0.0 0.5; - color: 0 0 0 0; - rel1 { - relative: 0.0 0.0; - offset: 0 0; - to: "button_image"; - } - rel2 { - relative: 0.0 1.0; - offset: 0 -7; - to: "button_image"; - } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - align: 0.0 0.5; - color: 0 0 0 0; - rel1 { - relative: 0.0 0.0; - offset: 6 6; - to: "button_image"; - } - rel2 { - relative: 0.0 1.0; - offset: 5 -7; - to: "button_image"; - } - } - } - part { - name: "button_text"; - type: TEXT; - effect: SHADOW; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - relative: 1.0 0.0; - offset: 6 6; - to_x: "icon_swallow"; - to_y: "button_image"; - } - rel2 { - relative: 1.0 1.0; - offset: -7 -7; - to: "button_image"; - } - color: 0 0 0 255; - color3: 255 255 255 128; - text { - text: "OK"; - font: "Edje-Vera"; - size: 10; - min: 1 1; - align: 0.5 0.5; - } - } - } - part { - name: "glint_clip"; - type: RECT; - mouse_events: 0; - description { - state: "default" 0.0; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: 3 3; - } - rel2 { - relative: 1.0 1.0; - offset: -4 -4; - } - } - } - part { - name: "glint1"; - mouse_events: 0; - description { - state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - align: 0.0 0.0; - max: 34 13; - rel1 { - relative: 0.0 0.0; - offset: 2 2; - } - rel2 { - relative: 1.0 1.0; - offset: -3 -3; - } - image { - normal: "e17_titlebar_glint1.png"; - border: 5 0 5 0; - } - fill { - smooth: 0; - } - } - description { - state: "active" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { - name: "glint2"; - mouse_events: 0; - clip_to: "glint_clip"; - description { - state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - align: 1.0 0.5; - max: 0 0; - rel1 { - relative: 0.0 0.0; - offset: 3 3; - } - rel2 { - relative: 0.0 1.0; - offset: 3 -4; - } - image { - normal: "e17_titlebar_glint2.png"; - border: 0 0 5 5; - } - fill { - smooth: 0; - } - } - description { - state: "active" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - max: 169 9999; - min: 169 8; - align: 0.5 0.5; - } - description { - state: "active2" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 128; - max: 169 9999; - min: 169 8; - align: 0.5 0.5; - rel1 { - relative: 1.0 0.0; - offset: -4 3; - } - rel2 { - relative: 1.0 1.0; - offset: -4 -4; - } - } - description { - state: "active3" 0.0; - inherit: "default" 0.0; - visible: 0; - color: 255 255 255 0; - max: 169 9999; - min: 169 8; - align: 0.0 0.5; - rel1 { - relative: 1.0 0.0; - offset: -4 3; - } - rel2 { - relative: 1.0 1.0; - offset: -4 -4; - } - } - } - part { - name: "glint3"; - mouse_events: 0; - description { - state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - align: 1.0 1.0; - max: 34 13; - rel1 { - relative: 0.0 0.0; - offset: 2 2; - } - rel2 { - relative: 1.0 1.0; - offset: -3 -3; - } - image { - normal: "e17_titlebar_glint3.png"; - border: 0 5 0 5; - } - fill { - smooth: 0; - } - } - description { - state: "active" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - - FOCUS_RECT(0.0, 0.0, 1.0, 1.0, 7, 7, -8, -8) - } - programs { - program { - name: "button_click"; - signal: "mouse,down,1"; - source: "button_image"; - action: STATE_SET "clicked" 0.0; - target: "button_image"; - } - program { - name: "button_unclick"; - signal: "mouse,up,1"; - source: "button_image"; - action: STATE_SET "default" 0.0; - target: "button_image"; - } - program { - name: "button_unclick2"; - signal: "mouse,clicked,1"; - source: "button_image"; - action: SIGNAL_EMIT "click" ""; - } - program { - name: "icon_visible"; - signal: "icon_visible"; - source: ""; - action: STATE_SET "visible" 0.0; - target: "icon_swallow"; - } - program { - name: "button_in"; - signal: "mouse,in"; - source: "button_image"; - action: SIGNAL_EMIT "enter" ""; - } - program { - name: "button_enter"; - signal: "enter"; - source: ""; - script { - run_program(PROGRAM:"go_active"); - } - } - program { - name: "go_active"; - action: STATE_SET "active" 0.0; - target: "glint1"; - target: "glint2"; - transition: LINEAR 0.05; - after: "go_active2"; - after: "go_active2b"; - } - program { - name: "go_active2"; - action: STATE_SET "active2" 0.0; - target: "glint2"; - transition: LINEAR 0.2; - after: "go_active3"; - after: "go_active3b"; - } - program { - name: "go_active2b"; - action: STATE_SET "active" 0.0; - target: "glint3"; - transition: LINEAR 0.2; - } - program { - name: "go_active3"; - action: STATE_SET "active3" 0.0; - target: "glint2"; - transition: LINEAR 0.05; - } - program { - name: "go_active3b"; - action: STATE_SET "default" 0.0; - target: "glint3"; - transition: LINEAR 0.1; - after: "go_active4"; - } - program { - name: "go_active4"; - action: STATE_SET "default" 0.0; - target: "glint1"; - target: "glint2"; - target: "glint3"; - } - program { - name: "button_focus"; - signal: "focus"; - source: ""; - FOCUS_ACTION - } - program { - name: "button_unfocus"; - signal: "unfocus"; - source: ""; - UNFOCUS_ACTION - } - } -} - -group { name: "widgets/dialog/text"; parts { part { =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_radio.edc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- default_radio.edc 10 Oct 2005 15:27:51 -0000 1.2 +++ default_radio.edc 12 Oct 2005 16:02:33 -0000 1.3 @@ -1,6 +1,7 @@ images { image: "e17_menu_radio1.png" COMP; image: "e17_menu_radio2.png" COMP; + image: "focus.png" COMP; } group { name: "widgets/radio"; @@ -89,6 +90,29 @@ color: 0 0 0 0; } } + part { + name: "focus"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + image { + normal: "focus.png"; + border: 7 7 7 7; + middle: 0; + } + fill { + smooth: 0; + } + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } } programs { program { @@ -117,5 +141,21 @@ name: "click2"; action: SIGNAL_EMIT "toggled" "on"; } + program { + name: "focus_in"; + signal: "focus_in"; + source: ""; + action: STATE_SET "focused" 0.0; + transition: DECELERATE 0.2; + target: "focus"; + } + program { + name: "focus_out"; + signal: "focus_out"; + source: ""; + action: STATE_SET "default" 0.0; + transition: ACCELERATE 0.5; + target: "focus"; + } } } ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs