Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : apps/e

Dir     : e17/apps/e/data/themes


Modified Files:
        default_dialog.edc 


Log Message:
Added tab / focus support to e_dialog's buttons.


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_dialog.edc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- default_dialog.edc  20 Sep 2005 08:34:23 -0000      1.9
+++ default_dialog.edc  24 Sep 2005 01:59:26 -0000      1.10
@@ -1,3 +1,149 @@
+#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;
@@ -6,6 +152,7 @@
    image: "e17_button2.png" COMP;
    image: "e17_button.png" COMP;
    image: "e17_dialog_watermark.png" COMP;
+   image: "focus.png" COMP;
 }
 
 styles
@@ -306,6 +453,7 @@
            }
         }
       }
+      FOCUS_RECT(0.0, 0.0, 1.0, 1.0, 7, 7, -8, -8)
    }
    programs {
       program {
@@ -335,6 +483,18 @@
         action: STATE_SET "visible" 0.0;
         target: "icon_swallow";
       }
+      program {
+        name: "button_focus";
+        signal: "focus";
+        source: "";
+        FOCUS_ACTION
+      }
+      program {
+        name: "button_unfocus";
+        signal: "unfocus";
+        source: "";
+        UNFOCUS_ACTION
+      }      
    }
 }
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to