Author: hisham
Date: 2005-06-14 17:50:34 -0400 (Tue, 14 Jun 2005)
New Revision: 45996

Modified:
   trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/evas/evas_extra_container.cs
Log:
trying to add shadow for boxes, need to put more thought into this

Modified: trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am 2005-06-14 
21:48:11 UTC (rev 45995)
+++ trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am 2005-06-14 
21:50:34 UTC (rev 45996)
@@ -1,4 +1,4 @@
 MAINTAINERCLEANFILES = Makefile.in
 
 filesdir =  $(pkgdatadir)/data/test/images
-files_DATA = e.png
+files_DATA = e.png shadow.png

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs       
2005-06-14 21:48:11 UTC (rev 45995)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs       
2005-06-14 21:50:34 UTC (rev 45996)
@@ -39,7 +39,8 @@
        private bool rendered = false;
        private BoxVAlign valign = BoxVAlign.Top;
        private BoxHAlign halign = BoxHAlign.Left;
-       
+
+       private Enlightenment.Evas.Image shadow;
        private Enlightenment.Evas.Rectangle clip;
        private Enlightenment.Evas.Rectangle internal_item;
        //private Enlightenment.Edje.Edje border;
@@ -63,7 +64,13 @@
             internal_item.Color = new Enlightenment.Evas.Color(255, 255, 255, 
0);
             
             clip = new Enlightenment.Evas.Rectangle(canvas);
-            clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 0);       
+            clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 0);
+            
+            shadow = new Enlightenment.Evas.Image(canvas);
+            shadow.Set(DataConfig.DATADIR + "/data/test/images/shadow.png", 
null);
+            shadow.Border = new ImageBorder(5, 5, 5, 5);
+            shadow.StackBelow(internal_item);
+            shadow.Color = new Enlightenment.Evas.Color(0, 0, 0, 128);
          }
        
        /* Usage functions, those are specific to Box */
@@ -168,6 +175,11 @@
             x = _x;
             y = _y;
             clip.Move(x, y);
+            internal_item.Move(x, y);
+            if(horizontal)
+              shadow.Move(x, y + 5);
+            else
+              shadow.Move(x + 5, y);
             if(rendered)
               Render();
          }   
@@ -181,7 +193,10 @@
          {
             width = w;
             height = h;
+            internal_item.Resize(width, height);
             clip.Resize(width, height);
+            shadow.Resize(width + 5, height + 5);
+            shadow.Fill = new ImageFill(0, 0, width + 5, height + 5);
             if(rendered)
               Render();
          }
@@ -189,6 +204,8 @@
        public override void Show()
          {
             clip.Show();
+            //internal_item.Show();
+            //shadow.Show();
             if(!rendered)
               Render();
          }

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs    
2005-06-14 21:48:11 UTC (rev 45995)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs    
2005-06-14 21:50:34 UTC (rev 45996)
@@ -25,7 +25,6 @@
        
       public Button(Enlightenment.Evas.Canvas c, string txt) : base(c, txt)
          {
-            System.Console.WriteLine(DataConfig.DATADIR + 
"/data/eblocks/themes/e17.edj");
             bg.FileSet(DataConfig.DATADIR + 
"/data/eblocks/themes/e17.edj","button");
             bg.Clip = clip;
             bg.RepeatEvents = true;    

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/evas/evas_extra_container.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/evas/evas_extra_container.cs 
2005-06-14 21:48:11 UTC (rev 45995)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/evas/evas_extra_container.cs 
2005-06-14 21:50:34 UTC (rev 45996)
@@ -122,7 +122,19 @@
             clip.RepeatEvents = true;
             clip.StackBelow(events_rect);           
          }     
+
+       public int HorizSpacer
+         {
+            get { return x_spacer; }
+            set { x_spacer = value; }
+         }
        
+       public int VertSpacer
+         {
+            get { return y_spacer; }
+            set { y_spacer = value; }
+         }
+       
        public void Add(string item)
          {
             items.Add(item);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to