Enlightenment CVS committal Author : moom16 Project : e17 Module : proto
Dir : e17/proto/etk/data/themes/default/macros Modified Files: scrollbar.edc Log Message: * More work on the menus * Add a menu bar (need some theming) * Add a status bar (the resize grip doesn't work yet) * Clean up etk_test * Some minor fixes and new things =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/macros/scrollbar.edc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- scrollbar.edc 2 Nov 2005 13:53:37 -0000 1.3 +++ scrollbar.edc 20 Nov 2005 10:33:28 -0000 1.4 @@ -1,48 +1,6 @@ -#define SCROLLBAR_BUTTON_SIZE 18 +#define SCROLLBAR_BUTTON_SIZE 15 -#define SCROLLBAR_DRAG(part_name, minw, minh, xdir, ydir, image_thumb) \ -part { \ - name: part_name"_shadow2"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - to: part_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - to: part_name; \ - } \ - image { \ - normal: "scrollbar_button_shadow2.png"; \ - border: 8 8 8 8; \ - } \ - } \ -} \ -part { \ - name: part_name"_shadow1"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - to: part_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - to: part_name; \ - } \ - image { \ - normal: "scrollbar_button_shadow1.png"; \ - border: 8 8 8 8; \ - } \ - } \ -} \ +#define SCROLLBAR_DRAG(part_name, minw, minh, xdir, ydir, image_up, image_down, image_thumb) \ part { \ name: part_name; \ dragable { \ @@ -65,8 +23,15 @@ to: "confine"; \ } \ image { \ - normal: "scrollbar_button.png"; \ - border: 8 8 8 8; \ + normal: image_up; \ + border: 5 5 5 5; \ + } \ + } \ + description { \ + state: "down" 0.0; \ + inherit: "default" 0.0; \ + image { \ + normal: image_down; \ } \ } \ } \ @@ -91,73 +56,23 @@ } \ } -#define SCROLLBAR_BUTTON(button_name, rx1, ry1, ox1, oy1, arrow_image) \ -part { \ - name: button_name"_shadow2"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - to: button_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - to: button_name; \ - } \ - image { \ - normal: "scrollbar_button_shadow2.png"; \ - border: 8 8 8 8; \ - } \ - } \ - description { \ - state: "active" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ - description { \ - state: "hidden" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ -} \ -part { \ - name: button_name"_shadow1"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - to: button_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - to: button_name; \ - } \ - image { \ - normal: "scrollbar_button_shadow1.png"; \ - border: 8 8 8 8; \ - } \ - } \ - description { \ - state: "active" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ - description { \ - state: "active" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ +#define SCROLLBAR_DRAG_PROG(part_name) \ +program { \ + name: part_name"_up"; \ + signal: "mouse,up,1"; \ + source: part_name; \ + action: STATE_SET "default" 0.0; \ + target: part_name; \ } \ +program { \ + name: part_name"_down"; \ + signal: "mouse,down,1"; \ + source: part_name; \ + action: STATE_SET "down" 0.0; \ + target: part_name; \ +} + +#define SCROLLBAR_BUTTON(button_name, rx1, ry1, ox1, oy1, image_up, image_down) \ part { \ name: button_name; \ description { \ @@ -171,70 +86,14 @@ offset: (ox1 + SCROLLBAR_BUTTON_SIZE) (oy1 + SCROLLBAR_BUTTON_SIZE); \ } \ image { \ - normal: "scrollbar_button.png"; \ - border: 8 8 8 8; \ + normal: image_up; \ } \ } \ description { \ - state: "active" 0.0; \ + state: "down" 0.0; \ inherit: "default" 0.0; \ - rel1 { \ - offset: (ox1 + 1) (oy1 + 1); \ - } \ - rel2 { \ - offset: (ox1 + SCROLLBAR_BUTTON_SIZE + 1) (oy1 + SCROLLBAR_BUTTON_SIZE + 1); \ - } \ - } \ - description { \ - state: "hidden" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ -} \ -part { \ - name: button_name"_arrow"; \ - mouse_events: 0; \ - description { \ - state: "default" 0.0; \ - max: 16 16; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 4 4; \ - to: button_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -5 -5; \ - to: button_name; \ - } \ image { \ - normal: arrow_image; \ - } \ - } \ - description { \ - state: "hidden" 0.0; \ - inherit: "default" 0.0; \ - visible: 0; \ - color: 255 255 255 0; \ - } \ -} \ -part { \ - name: button_name"_rect"; \ - type: RECT; \ - mouse_events: 1; \ - description { \ - state: "default" 0.0; \ - color: 255 255 255 0; \ - rel1 { \ - relative: 0.0 0.0; \ - offset: 0 0; \ - to: button_name; \ - } \ - rel2 { \ - relative: 1.0 1.0; \ - offset: -1 -1; \ - to: button_name; \ + normal: image_down; \ } \ } \ } @@ -242,78 +101,28 @@ #define SCROLLBAR_BUTTON_PROG(button_name, dir) \ program { \ - name: button_name"_active_pre"; \ - signal: "mouse,down,1"; \ - source: button_name"_rect"; \ - action: STATE_SET "default" 0.0; \ - target: button_name"_shadow1"; \ - target: button_name"_shadow2"; \ - target: button_name; \ - target: button_name"_arrow"; \ - after: button_name"_active"; \ - after: button_name"_active_p"; \ -} \ -program { \ - name: button_name"_active"; \ - action: STATE_SET "active" 0.0; \ - target: button_name"_shadow2"; \ - transition: LINEAR 0.05; \ - after: button_name"_active2"; \ -} \ -program { \ - name: button_name"_active2"; \ - action: STATE_SET "active" 0.0; \ - target: button_name"_shadow1"; \ - transition: LINEAR 0.05; \ -} \ -program { \ - name: button_name"_active_p"; \ - action: STATE_SET "active" 0.0; \ - target: button_name; \ - target: button_name"_arrow"; \ - transition: LINEAR 0.1; \ -} \ -program { \ - name: button_name"_passive_pre"; \ + name: button_name"_up"; \ signal: "mouse,up,1"; \ - source: button_name"_rect"; \ - action: STATE_SET "active" 0.0; \ - target: button_name"_shadow1"; \ - target: button_name"_shadow2"; \ - target: button_name; \ - target: button_name"_arrow"; \ - after: button_name"_passive"; \ - after: button_name"_passive_p"; \ -} \ -program { \ - name: button_name"_passive"; \ - action: STATE_SET "default" 0.0; \ - target: button_name"_shadow2"; \ - transition: LINEAR 0.1; \ - after: button_name"_passive2"; \ -} \ -program { \ - name: button_name"_passive2"; \ + source: button_name; \ action: STATE_SET "default" 0.0; \ - target: button_name"_shadow1"; \ - transition: LINEAR 0.1; \ + target: button_name; \ } \ program { \ - name: button_name"_passive_p"; \ - action: STATE_SET "default" 0.0; \ + name: button_name"_down"; \ + signal: "mouse,down,1"; \ + source: button_name; \ + action: STATE_SET "down" 0.0; \ target: button_name; \ - target: button_name"_arrow"; \ - transition: LINEAR 0.2; \ } \ program { \ - name: button_name"_button_pressed"; \ - source: button_name"_rect"; \ + name: button_name"_pressed"; \ + source: button_name; \ signal: "mouse,down,1"; \ action: SIGNAL_EMIT "scroll_"dir"_start" ""; \ } \ program { \ - name: button_name"_button_released"; \ - source: button_name"_rect"; \ + name: button_name"_released"; \ + source: button_name; \ signal: "mouse,up,1"; \ action: SIGNAL_EMIT "scroll_stop" ""; \ } ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs