[longomatch/drawing: 3/3] Drawing tool finished. Start testing



commit e7fdcc9116e5d5e8b6bdb62cc689c4a2f5a8b637
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Oct 2 14:39:23 2009 +0200

    Drawing tool finished. Start testing

 LongoMatch/Gui/Component/DrawingToolBox.cs         |   21 ++-
 LongoMatch/Gui/Component/DrawingWidget.cs          |  129 +++++++++---
 LongoMatch/Gui/Dialog/DrawingTool.cs               |   14 +-
 LongoMatch/Handlers/DrawingManager.cs              |    3 +-
 LongoMatch/Handlers/Handlers.cs                    |    2 +
 .../LongoMatch.Gui.Component.DrawingToolBox.cs     |  230 +++++++++++++-------
 .../LongoMatch.Gui.Component.DrawingWidget.cs      |    1 +
 .../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs   |    3 +-
 LongoMatch/gtk-gui/gui.stetic                      |   93 ++++++++-
 LongoMatch/gtk-gui/objects.xml                     |    5 +-
 10 files changed, 377 insertions(+), 124 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/DrawingToolBox.cs b/LongoMatch/Gui/Component/DrawingToolBox.cs
index c3e1cea..b694415 100644
--- a/LongoMatch/Gui/Component/DrawingToolBox.cs
+++ b/LongoMatch/Gui/Component/DrawingToolBox.cs
@@ -24,7 +24,6 @@ using LongoMatch.Handlers;
 namespace LongoMatch.Gui.Component
 {
 	
-	
 	[System.ComponentModel.ToolboxItem(true)] 
 	public partial class DrawingToolBox : Gtk.Bin
 	{
@@ -34,6 +33,7 @@ namespace LongoMatch.Gui.Component
 		public event ColorChangedHandler ColorChanged;
 		public event VisibilityChangedHandler VisibilityChanged;
 		public event ClearDrawingHandler ClearDrawing;
+		public event TransparencyChangedHandler TransparencyChanged;
 		
 		Gdk.Color normalColor;
 		Gdk.Color activeColor;		
@@ -47,6 +47,8 @@ namespace LongoMatch.Gui.Component
 			SetButtonColor(gbutton,"green");
 			SetButtonColor(blbutton,"blue");
 			SetButtonColor(ybutton,"yellow");
+			penbutton.Active = true;
+			rbutton.Active = true;
 		}
 		
 		public bool DrawingVisibility{
@@ -55,6 +57,17 @@ namespace LongoMatch.Gui.Component
 					VisibilityChanged(value);
 			}
 		}
+
+		public bool ToolsVisible{
+			set{
+				toolstable.Visible=value;
+				toolslabel.Visible= value;
+			}
+		}
+		
+		public bool InfoVisible{
+			set{label1.Visible=value;}
+		}
 		
 		private void SetButtonColor(Button button, string color){
 			
@@ -133,6 +146,12 @@ namespace LongoMatch.Gui.Component
 		{
 			if (ClearDrawing != null)
 				ClearDrawing();
+		}
+
+		protected virtual void OnSpinbutton1Changed (object sender, System.EventArgs e)
+		{
+			if (TransparencyChanged != null)
+				TransparencyChanged(spinbutton1.Value/100);
 		}	
 	}
 }
diff --git a/LongoMatch/Gui/Component/DrawingWidget.cs b/LongoMatch/Gui/Component/DrawingWidget.cs
index b3f4e82..8b28088 100644
--- a/LongoMatch/Gui/Component/DrawingWidget.cs
+++ b/LongoMatch/Gui/Component/DrawingWidget.cs
@@ -41,6 +41,7 @@ namespace LongoMatch.Gui.Component
 		
 		private Cairo.Color lineColor;
 		private int lineWidth;
+		private double transparency;
 		private DrawTool selectedTool;
 		
 		private Cairo.PointD initialPoint,finalPoint;
@@ -51,6 +52,7 @@ namespace LongoMatch.Gui.Component
 		private bool visible;
 		private bool preview;
 		
+		
 		//Offset values to keep image in center
 		private int xOffset;
 		private int yOffset;
@@ -59,12 +61,16 @@ namespace LongoMatch.Gui.Component
 		private double lastx=0;
 		private double lasty=0;
 		
+		private const double ARROW_DEGREES = 0.5;
+		private const int ARROW_LENGHT = 15;
+		
 		public DrawingWidget()
 		{
 			this.Build();	
 			lineColor = new Cairo.Color(Double.MaxValue,0,0);
 			lineWidth = 6;
-			SelectedTool = DrawTool.PEN;
+			Transparency=1;
+			selectedTool = DrawTool.PEN;
 			loaded = false;
 			visible = true;
 			preview=false;
@@ -82,6 +88,8 @@ namespace LongoMatch.Gui.Component
 				}
 				drawingarea.WidthRequest=sourceWidth;
 				drawingarea.HeightRequest=sourceHeight;
+				if (GdkWindow != null)
+					GdkWindow.Resize(sourceWidth,sourceHeight);
 				value.Dispose();
 				loaded = true;
 			}			
@@ -89,7 +97,16 @@ namespace LongoMatch.Gui.Component
 				
 		public int LineWidth{
 			set{lineWidth = value;}
-		}		
+		}
+		
+		public double Transparency{
+			set{
+				if (value >=0 && value <=1){
+					transparency = value;
+					drawingarea.QueueDraw();
+				}
+			}
+		}
 		
 		public Gdk.Color LineColor{
 			set{lineColor = new Cairo.Color(value.Red,value.Green,value.Blue);}
@@ -99,16 +116,27 @@ namespace LongoMatch.Gui.Component
 			set{
 				this.selectedTool = value;
 				switch (selectedTool){
-						case DrawTool.LINE:
-							break;
-						case DrawTool.RECTANGLE:
-							break;
-						case DrawTool.CIRCLE:
-							break;
-						case DrawTool.CROSS:
-							break;
-						default:
-							break;						
+					case DrawTool.LINE:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.DraftSmall);
+						break;
+					case DrawTool.RECTANGLE:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.Dotbox);
+						break;
+					case DrawTool.CIRCLE:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.Circle);
+						break;
+					case DrawTool.CROSS:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.XCursor);
+						break;
+					case DrawTool.ERASER:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.Target);
+						break;
+					case DrawTool.PEN:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.Pencil);
+						break;
+					default:
+						drawingarea.GdkWindow.Cursor = new Cursor(CursorType.Arrow);
+						break;					
 				}
 			}
 			get{return selectedTool;}
@@ -124,21 +152,38 @@ namespace LongoMatch.Gui.Component
 			QueueDraw();
 		}
 		
-		public void SaveDraw(string filename){
+		public void SaveAll(string filename){
+			Save(filename,true,true);
+		}
+		
+		
+		private void Save(string filename,bool bSource,bool bDrawings){
 			Surface pngSurface = new ImageSurface (Format.ARGB32,sourceWidth,sourceHeight);
 			using (Context c = new Context(pngSurface)){
-				c.SetSourceSurface(source,xOffset,yOffset);
-				c.Paint();
-				c.SetSourceSurface(drawings,xOffset,yOffset);
-				c.Paint();
+				if (bSource){
+					c.SetSourceSurface(source,xOffset,yOffset);
+					c.Paint();
+				}
+				if (bDrawings){
+					c.SetSourceSurface(drawings,xOffset,yOffset);
+					c.PaintWithAlpha(transparency);
+				}
 			}
 			pngSurface.WriteToPng(filename);
 		}
 		
-		private void SetContextProperties(Context c){
-			c.LineWidth = lineWidth;
+		private void SetContextProperties(Context c){			
 			c.LineCap = LineCap.Round;
-			c.Color =lineColor;
+			c.LineJoin = LineJoin.Round;
+			if (selectedTool != DrawTool.ERASER){
+				c.Color = lineColor;
+				c.LineWidth = lineWidth;
+				c.Operator = Operator.Over;
+			}else{
+				c.Color = new Cairo.Color(0,0,0,0);
+				c.LineWidth = lineWidth*2;
+				c.Operator = Operator.Source;
+			}
 		}
 			
 		private void DrawLine(Context c, double x1, double y1, double x2, double y2){		
@@ -149,6 +194,23 @@ namespace LongoMatch.Gui.Component
 			c.Fill();		
 		}
 		
+		private void DrawArrow(Context c, double x1, double y1, double x2, double y2){
+			double vx1,vy1,vx2,vy2;
+			double angle = Math.Atan2(y2 - y1, x2 - x1) + Math.PI;
+
+			vx1 = x2 + (ARROW_LENGHT + lineWidth) * Math.Cos(angle - ARROW_DEGREES);
+			vy1 = y2 + (ARROW_LENGHT + lineWidth) * Math.Sin(angle - ARROW_DEGREES);
+			vx2 = x2 + (ARROW_LENGHT + lineWidth) * Math.Cos(angle + ARROW_DEGREES);
+			vy2 = y2 + (ARROW_LENGHT + lineWidth) * Math.Sin(angle + ARROW_DEGREES);
+			
+			c.MoveTo(x2-xOffset,y2-yOffset);
+			c.LineTo(vx1-xOffset,vy1-yOffset);
+			c.MoveTo(x2-xOffset,y2-yOffset);
+			c.LineTo(vx2-xOffset,vy2-yOffset);
+			c.Stroke();
+			c.Fill();		
+    }
+		
 		private void DrawRectangle(Context c, double x1, double y1, double x2, double y2){	
 			SetContextProperties(c);
 			c.Rectangle(x1-xOffset,y1-yOffset,x2-x1,y2-y1);
@@ -190,7 +252,7 @@ namespace LongoMatch.Gui.Component
 				c.Paint();
 				if (visible){
 					c.SetSourceSurface(drawings,xOffset,yOffset);
-					c.Paint();					
+					c.PaintWithAlpha(transparency);					
 				}
 				
 				//Preview
@@ -198,6 +260,7 @@ namespace LongoMatch.Gui.Component
 				switch (selectedTool){
 						case DrawTool.LINE:
 							DrawLine(c,initialPoint.X+xOffset,initialPoint.Y+yOffset,finalPoint.X+xOffset,finalPoint.Y+yOffset);
+							DrawArrow(c,initialPoint.X+xOffset,initialPoint.Y+yOffset,finalPoint.X+xOffset,finalPoint.Y+yOffset);
 							break;
 						case DrawTool.RECTANGLE:
 							DrawRectangle(c,initialPoint.X+xOffset,initialPoint.Y+yOffset,finalPoint.X+xOffset,finalPoint.Y+yOffset);
@@ -220,7 +283,7 @@ namespace LongoMatch.Gui.Component
 			preview = true;
 			initialPoint = new Cairo.PointD(args.Event.X,args.Event.Y);
 			
-			if (selectedTool == DrawTool.PEN){
+			if (selectedTool == DrawTool.PEN || selectedTool == DrawTool.ERASER ){
 				lastx = args.Event.X;
 				lasty = args.Event.Y;
 			
@@ -238,12 +301,9 @@ namespace LongoMatch.Gui.Component
 			finalPoint = new Cairo.PointD(args.Event.X,args.Event.Y);
 			using (Context c = new Context(drawings)){
 				switch (selectedTool){
-					case DrawTool.PEN:
-						lastx=0;
-						lasty=0;
-						break;
 					case DrawTool.LINE:
 						DrawLine(c,initialPoint.X,initialPoint.Y,finalPoint.X,finalPoint.Y);
+						DrawArrow(c,initialPoint.X,initialPoint.Y,finalPoint.X,finalPoint.Y);
 						break;
 					case DrawTool.RECTANGLE:
 						DrawRectangle(c,initialPoint.X,initialPoint.Y,finalPoint.X,finalPoint.Y);
@@ -254,8 +314,9 @@ namespace LongoMatch.Gui.Component
 					case DrawTool.CROSS:
 						DrawCross(c,initialPoint.X,initialPoint.Y,finalPoint.X,finalPoint.Y);
 						break;
-					default:
-						DrawLine(c,initialPoint.X,initialPoint.Y,finalPoint.X,finalPoint.Y);
+					default: //ERASER and PEN
+						lastx=0;
+						lasty=0;
 						break;						
 				}
 			}
@@ -266,7 +327,7 @@ namespace LongoMatch.Gui.Component
 		{
 			finalPoint = new Cairo.PointD(args.Event.X,args.Event.Y);
 			
-			if (selectedTool == DrawTool.PEN){
+			if (selectedTool == DrawTool.PEN || selectedTool == DrawTool.ERASER){
 				using (Context c = new Context(drawings)){
 					DrawLine (c,lastx,lasty,args.Event.X,args.Event.Y);
 				}
@@ -278,6 +339,8 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnDrawingareaSizeAllocated (object o, Gtk.SizeAllocatedArgs args)
 		{
+			// Center the source in the drawing area if its size
+			// is smaller than the drawing area one
 			if (args.Allocation.Width > sourceWidth)
 				xOffset = (Allocation.Width - sourceWidth) / 2;
 			else 
@@ -287,6 +350,14 @@ namespace LongoMatch.Gui.Component
 				yOffset = (Allocation.Height -sourceHeight) / 2;
 			else
 				yOffset = 0;		
+		}
+
+		protected virtual void OnDrawingareaConfigureEvent (object o, Gtk.ConfigureEventArgs args)
+		{
+			// We can't set the cursor until the Gdk.Window exists
+			DrawTool = selectedTool;
+			if (loaded)
+				GdkWindow.Resize(sourceWidth,sourceHeight);
 		}	
 	}
 }
diff --git a/LongoMatch/Gui/Dialog/DrawingTool.cs b/LongoMatch/Gui/Dialog/DrawingTool.cs
index 66d7924..5480279 100644
--- a/LongoMatch/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch/Gui/Dialog/DrawingTool.cs
@@ -33,10 +33,15 @@ namespace LongoMatch.Gui.Dialog
 		{
 			this.Build();
 			drawingtoolbox1.DrawToolChanged += OnDrawingtoolbox1DrawToolChanged;
+			drawingtoolbox1.TransparencyChanged += OnDrawingtoolbox1TransparencyChanged;
+			drawingtoolbox1.ToolsVisible = true;
+			drawingtoolbox1.InfoVisible = false;
 		}
 		
 		public Pixbuf Image{
-			set{drawingwidget1.SourceImage = value;}
+			set{
+				drawingwidget1.SourceImage = value;			
+			}
 		}
 
 		protected virtual void OnDrawingtoolbox1LineWidthChanged (int width)
@@ -63,6 +68,11 @@ namespace LongoMatch.Gui.Dialog
 		{
 			drawingwidget1.DrawTool = tool;
 		}
+		
+		protected virtual void OnDrawingtoolbox1TransparencyChanged (double transparency)
+		{
+			drawingwidget1.Transparency = transparency;
+		}
 
 		protected virtual void OnSavebuttonClicked (object sender, System.EventArgs e)
 		{
@@ -85,7 +95,7 @@ namespace LongoMatch.Gui.Dialog
 				filename = fChooser.Filename;
 				if (System.IO.Path.GetExtension(filename) != "png")
 					filename += ".png";			
-				drawingwidget1.SaveDraw(filename);
+				drawingwidget1.SaveAll(filename);
 			}
 			fChooser.Destroy();		
 		}
diff --git a/LongoMatch/Handlers/DrawingManager.cs b/LongoMatch/Handlers/DrawingManager.cs
index 7de9311..7f95cc7 100644
--- a/LongoMatch/Handlers/DrawingManager.cs
+++ b/LongoMatch/Handlers/DrawingManager.cs
@@ -40,7 +40,8 @@ namespace LongoMatch.Handlers
 			toolBox.ColorChanged += new ColorChangedHandler(OnColorChanged);
 			toolBox.LineWidthChanged += new LineWidthChangedHandler(OnLineWidthChanged);
 			toolBox.VisibilityChanged += new VisibilityChangedHandler(OnVisibilityChanged);
-			toolBox.ClearDrawing += new ClearDrawingHandler(OnClearDrawing);			                                                               
+			toolBox.ClearDrawing += new ClearDrawingHandler(OnClearDrawing);
+			toolBox.ToolsVisible=false;
 		}
 		
 		public  void OnKeyPressEvent (object o, Gtk.KeyPressEventArgs args)
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index 2785c27..f418265 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -61,6 +61,8 @@ namespace LongoMatch.Handlers
 	public delegate void VisibilityChangedHandler (bool visible);
 	//Clear drawings
 	public delegate void ClearDrawingHandler ();
+	//Transparency value changed
+	public delegate void TransparencyChangedHandler(double transparency);
 	
 	
 	//The position of the stream has changed
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index cadbd3b..f808629 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -15,6 +15,8 @@ namespace LongoMatch.Gui.Component {
         
         private Gtk.VBox vbox2;
         
+        private Gtk.Label toolslabel;
+        
         private Gtk.Table toolstable;
         
         private Gtk.RadioButton circlebutton;
@@ -41,8 +43,16 @@ namespace LongoMatch.Gui.Component {
         
         private Gtk.Image image84;
         
+        private Gtk.Label label3;
+        
         private Gtk.ComboBox combobox1;
         
+        private Gtk.Label transparencylabel;
+        
+        private Gtk.SpinButton spinbutton1;
+        
+        private Gtk.Label colorslabel;
+        
         private Gtk.Table colorstable;
         
         private Gtk.RadioButton bbutton;
@@ -71,6 +81,17 @@ namespace LongoMatch.Gui.Component {
             this.vbox2.Name = "vbox2";
             this.vbox2.Spacing = 6;
             // Container child vbox2.Gtk.Box+BoxChild
+            this.toolslabel = new Gtk.Label();
+            this.toolslabel.Name = "toolslabel";
+            this.toolslabel.Xalign = 0F;
+            this.toolslabel.LabelProp = Mono.Unix.Catalog.GetString("<b>Tools</b>");
+            this.toolslabel.UseMarkup = true;
+            this.vbox2.Add(this.toolslabel);
+            Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolslabel]));
+            w1.Position = 0;
+            w1.Expand = false;
+            w1.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
             this.toolstable = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
             this.toolstable.Name = "toolstable";
             this.toolstable.RowSpacing = ((uint)(6));
@@ -89,12 +110,12 @@ namespace LongoMatch.Gui.Component {
             this.image79.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-circle-unfilled", Gtk.IconSize.Menu, 16);
             this.circlebutton.Add(this.image79);
             this.toolstable.Add(this.circlebutton);
-            Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.toolstable[this.circlebutton]));
-            w2.TopAttach = ((uint)(2));
-            w2.BottomAttach = ((uint)(3));
-            w2.LeftAttach = ((uint)(1));
-            w2.RightAttach = ((uint)(2));
-            w2.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.toolstable[this.circlebutton]));
+            w3.TopAttach = ((uint)(2));
+            w3.BottomAttach = ((uint)(3));
+            w3.LeftAttach = ((uint)(1));
+            w3.RightAttach = ((uint)(2));
+            w3.YOptions = ((Gtk.AttachOptions)(4));
             // Container child toolstable.Gtk.Table+TableChild
             this.crossbutton = new Gtk.RadioButton("");
             this.crossbutton.CanFocus = true;
@@ -109,12 +130,12 @@ namespace LongoMatch.Gui.Component {
             this.image83.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-45", Gtk.IconSize.Menu, 16);
             this.crossbutton.Add(this.image83);
             this.toolstable.Add(this.crossbutton);
-            Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.toolstable[this.crossbutton]));
-            w4.TopAttach = ((uint)(1));
-            w4.BottomAttach = ((uint)(2));
-            w4.LeftAttach = ((uint)(1));
-            w4.RightAttach = ((uint)(2));
-            w4.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.toolstable[this.crossbutton]));
+            w5.TopAttach = ((uint)(1));
+            w5.BottomAttach = ((uint)(2));
+            w5.LeftAttach = ((uint)(1));
+            w5.RightAttach = ((uint)(2));
+            w5.YOptions = ((Gtk.AttachOptions)(4));
             // Container child toolstable.Gtk.Table+TableChild
             this.eraserbutton = new Gtk.RadioButton("");
             this.eraserbutton.CanFocus = true;
@@ -129,10 +150,10 @@ namespace LongoMatch.Gui.Component {
             this.image81.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
             this.eraserbutton.Add(this.image81);
             this.toolstable.Add(this.eraserbutton);
-            Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.toolstable[this.eraserbutton]));
-            w6.LeftAttach = ((uint)(1));
-            w6.RightAttach = ((uint)(2));
-            w6.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.toolstable[this.eraserbutton]));
+            w7.LeftAttach = ((uint)(1));
+            w7.RightAttach = ((uint)(2));
+            w7.YOptions = ((Gtk.AttachOptions)(4));
             // Container child toolstable.Gtk.Table+TableChild
             this.linebutton = new Gtk.RadioButton("");
             this.linebutton.CanFocus = true;
@@ -147,10 +168,10 @@ namespace LongoMatch.Gui.Component {
             this.image82.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line-ends-with-arrow", Gtk.IconSize.Menu, 16);
             this.linebutton.Add(this.image82);
             this.toolstable.Add(this.linebutton);
-            Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.toolstable[this.linebutton]));
-            w8.TopAttach = ((uint)(1));
-            w8.BottomAttach = ((uint)(2));
-            w8.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.toolstable[this.linebutton]));
+            w9.TopAttach = ((uint)(1));
+            w9.BottomAttach = ((uint)(2));
+            w9.YOptions = ((Gtk.AttachOptions)(4));
             // Container child toolstable.Gtk.Table+TableChild
             this.penbutton = new Gtk.RadioButton("");
             this.penbutton.CanFocus = true;
@@ -165,8 +186,8 @@ namespace LongoMatch.Gui.Component {
             this.image80.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-freeform-line", Gtk.IconSize.Menu, 16);
             this.penbutton.Add(this.image80);
             this.toolstable.Add(this.penbutton);
-            Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.toolstable[this.penbutton]));
-            w10.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.toolstable[this.penbutton]));
+            w11.YOptions = ((Gtk.AttachOptions)(4));
             // Container child toolstable.Gtk.Table+TableChild
             this.rectanglebutton = new Gtk.RadioButton("");
             this.rectanglebutton.CanFocus = true;
@@ -181,14 +202,25 @@ namespace LongoMatch.Gui.Component {
             this.image84.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-rectangle-unfilled", Gtk.IconSize.Menu, 16);
             this.rectanglebutton.Add(this.image84);
             this.toolstable.Add(this.rectanglebutton);
-            Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.toolstable[this.rectanglebutton]));
-            w12.TopAttach = ((uint)(2));
-            w12.BottomAttach = ((uint)(3));
-            w12.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.toolstable[this.rectanglebutton]));
+            w13.TopAttach = ((uint)(2));
+            w13.BottomAttach = ((uint)(3));
+            w13.YOptions = ((Gtk.AttachOptions)(4));
             this.vbox2.Add(this.toolstable);
-            Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolstable]));
-            w13.Position = 0;
-            w13.Expand = false;
+            Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolstable]));
+            w14.Position = 1;
+            w14.Expand = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.label3 = new Gtk.Label();
+            this.label3.Name = "label3";
+            this.label3.Xalign = 0F;
+            this.label3.LabelProp = Mono.Unix.Catalog.GetString("<b>Width</b>");
+            this.label3.UseMarkup = true;
+            this.vbox2.Add(this.label3);
+            Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox2[this.label3]));
+            w15.Position = 2;
+            w15.Expand = false;
+            w15.Fill = false;
             // Container child vbox2.Gtk.Box+BoxChild
             this.combobox1 = Gtk.ComboBox.NewText();
             this.combobox1.AppendText(Mono.Unix.Catalog.GetString("2 px"));
@@ -199,10 +231,45 @@ namespace LongoMatch.Gui.Component {
             this.combobox1.Name = "combobox1";
             this.combobox1.Active = 2;
             this.vbox2.Add(this.combobox1);
-            Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox2[this.combobox1]));
-            w14.Position = 1;
-            w14.Expand = false;
-            w14.Fill = false;
+            Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox2[this.combobox1]));
+            w16.Position = 3;
+            w16.Expand = false;
+            w16.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.transparencylabel = new Gtk.Label();
+            this.transparencylabel.Name = "transparencylabel";
+            this.transparencylabel.Xalign = 0F;
+            this.transparencylabel.LabelProp = Mono.Unix.Catalog.GetString("<b>Transparency</b>");
+            this.transparencylabel.UseMarkup = true;
+            this.vbox2.Add(this.transparencylabel);
+            Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.vbox2[this.transparencylabel]));
+            w17.Position = 4;
+            w17.Expand = false;
+            w17.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.spinbutton1 = new Gtk.SpinButton(0, 100, 1);
+            this.spinbutton1.CanFocus = true;
+            this.spinbutton1.Name = "spinbutton1";
+            this.spinbutton1.Adjustment.PageIncrement = 10;
+            this.spinbutton1.ClimbRate = 1;
+            this.spinbutton1.Numeric = true;
+            this.spinbutton1.Value = 80;
+            this.vbox2.Add(this.spinbutton1);
+            Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.spinbutton1]));
+            w18.Position = 5;
+            w18.Expand = false;
+            w18.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.colorslabel = new Gtk.Label();
+            this.colorslabel.Name = "colorslabel";
+            this.colorslabel.Xalign = 0F;
+            this.colorslabel.LabelProp = Mono.Unix.Catalog.GetString("<b>Colors</b>");
+            this.colorslabel.UseMarkup = true;
+            this.vbox2.Add(this.colorslabel);
+            Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox2[this.colorslabel]));
+            w19.Position = 6;
+            w19.Expand = false;
+            w19.Fill = false;
             // Container child vbox2.Gtk.Box+BoxChild
             this.colorstable = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
             this.colorstable.Name = "colorstable";
@@ -216,10 +283,10 @@ namespace LongoMatch.Gui.Component {
             this.bbutton.FocusOnClick = false;
             this.bbutton.Group = new GLib.SList(System.IntPtr.Zero);
             this.colorstable.Add(this.bbutton);
-            Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.colorstable[this.bbutton]));
-            w15.LeftAttach = ((uint)(1));
-            w15.RightAttach = ((uint)(2));
-            w15.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.colorstable[this.bbutton]));
+            w20.LeftAttach = ((uint)(1));
+            w20.RightAttach = ((uint)(2));
+            w20.YOptions = ((Gtk.AttachOptions)(4));
             // Container child colorstable.Gtk.Table+TableChild
             this.blbutton = new Gtk.RadioButton("");
             this.blbutton.Name = "blbutton";
@@ -228,12 +295,12 @@ namespace LongoMatch.Gui.Component {
             this.blbutton.FocusOnClick = false;
             this.blbutton.Group = this.bbutton.Group;
             this.colorstable.Add(this.blbutton);
-            Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.colorstable[this.blbutton]));
-            w16.TopAttach = ((uint)(1));
-            w16.BottomAttach = ((uint)(2));
-            w16.LeftAttach = ((uint)(1));
-            w16.RightAttach = ((uint)(2));
-            w16.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(this.colorstable[this.blbutton]));
+            w21.TopAttach = ((uint)(1));
+            w21.BottomAttach = ((uint)(2));
+            w21.LeftAttach = ((uint)(1));
+            w21.RightAttach = ((uint)(2));
+            w21.YOptions = ((Gtk.AttachOptions)(4));
             // Container child colorstable.Gtk.Table+TableChild
             this.gbutton = new Gtk.RadioButton("");
             this.gbutton.Name = "gbutton";
@@ -242,10 +309,10 @@ namespace LongoMatch.Gui.Component {
             this.gbutton.FocusOnClick = false;
             this.gbutton.Group = this.bbutton.Group;
             this.colorstable.Add(this.gbutton);
-            Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.colorstable[this.gbutton]));
-            w17.TopAttach = ((uint)(2));
-            w17.BottomAttach = ((uint)(3));
-            w17.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(this.colorstable[this.gbutton]));
+            w22.TopAttach = ((uint)(2));
+            w22.BottomAttach = ((uint)(3));
+            w22.YOptions = ((Gtk.AttachOptions)(4));
             // Container child colorstable.Gtk.Table+TableChild
             this.rbutton = new Gtk.RadioButton("");
             this.rbutton.Name = "rbutton";
@@ -254,10 +321,10 @@ namespace LongoMatch.Gui.Component {
             this.rbutton.FocusOnClick = false;
             this.rbutton.Group = this.bbutton.Group;
             this.colorstable.Add(this.rbutton);
-            Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.colorstable[this.rbutton]));
-            w18.TopAttach = ((uint)(1));
-            w18.BottomAttach = ((uint)(2));
-            w18.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.colorstable[this.rbutton]));
+            w23.TopAttach = ((uint)(1));
+            w23.BottomAttach = ((uint)(2));
+            w23.YOptions = ((Gtk.AttachOptions)(4));
             // Container child colorstable.Gtk.Table+TableChild
             this.wbutton = new Gtk.RadioButton("");
             this.wbutton.Name = "wbutton";
@@ -266,8 +333,8 @@ namespace LongoMatch.Gui.Component {
             this.wbutton.FocusOnClick = false;
             this.wbutton.Group = this.bbutton.Group;
             this.colorstable.Add(this.wbutton);
-            Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.colorstable[this.wbutton]));
-            w19.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.colorstable[this.wbutton]));
+            w24.YOptions = ((Gtk.AttachOptions)(4));
             // Container child colorstable.Gtk.Table+TableChild
             this.ybutton = new Gtk.RadioButton("");
             this.ybutton.Name = "ybutton";
@@ -276,51 +343,51 @@ namespace LongoMatch.Gui.Component {
             this.ybutton.FocusOnClick = false;
             this.ybutton.Group = this.bbutton.Group;
             this.colorstable.Add(this.ybutton);
-            Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.colorstable[this.ybutton]));
-            w20.TopAttach = ((uint)(2));
-            w20.BottomAttach = ((uint)(3));
-            w20.LeftAttach = ((uint)(1));
-            w20.RightAttach = ((uint)(2));
-            w20.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.colorstable[this.ybutton]));
+            w25.TopAttach = ((uint)(2));
+            w25.BottomAttach = ((uint)(3));
+            w25.LeftAttach = ((uint)(1));
+            w25.RightAttach = ((uint)(2));
+            w25.YOptions = ((Gtk.AttachOptions)(4));
             this.vbox2.Add(this.colorstable);
-            Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.vbox2[this.colorstable]));
-            w21.Position = 2;
-            w21.Expand = false;
-            w21.Fill = false;
+            Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.vbox2[this.colorstable]));
+            w26.Position = 7;
+            w26.Expand = false;
+            w26.Fill = false;
             // Container child vbox2.Gtk.Box+BoxChild
             this.clearbutton = new Gtk.Button();
             this.clearbutton.CanFocus = true;
             this.clearbutton.Name = "clearbutton";
             this.clearbutton.UseUnderline = true;
             // Container child clearbutton.Gtk.Container+ContainerChild
-            Gtk.Alignment w22 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
+            Gtk.Alignment w27 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
             // Container child GtkAlignment.Gtk.Container+ContainerChild
-            Gtk.HBox w23 = new Gtk.HBox();
-            w23.Spacing = 2;
+            Gtk.HBox w28 = new Gtk.HBox();
+            w28.Spacing = 2;
             // Container child GtkHBox.Gtk.Container+ContainerChild
-            Gtk.Image w24 = new Gtk.Image();
-            w24.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.LargeToolbar, 24);
-            w23.Add(w24);
+            Gtk.Image w29 = new Gtk.Image();
+            w29.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.LargeToolbar, 24);
+            w28.Add(w29);
             // Container child GtkHBox.Gtk.Container+ContainerChild
-            Gtk.Label w26 = new Gtk.Label();
-            w23.Add(w26);
-            w22.Add(w23);
-            this.clearbutton.Add(w22);
+            Gtk.Label w31 = new Gtk.Label();
+            w28.Add(w31);
+            w27.Add(w28);
+            this.clearbutton.Add(w27);
             this.vbox2.Add(this.clearbutton);
-            Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox2[this.clearbutton]));
-            w30.Position = 3;
-            w30.Expand = false;
-            w30.Fill = false;
+            Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(this.vbox2[this.clearbutton]));
+            w35.Position = 8;
+            w35.Expand = false;
+            w35.Fill = false;
             // Container child vbox2.Gtk.Box+BoxChild
             this.label1 = new Gtk.Label();
             this.label1.Name = "label1";
             this.label1.LabelProp = Mono.Unix.Catalog.GetString("Draw-><b> D</b>\nClear-><b> C</b>\nHide-><b> S</b>\nShow-><b> S</b>\n");
             this.label1.UseMarkup = true;
             this.vbox2.Add(this.label1);
-            Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
-            w31.Position = 4;
-            w31.Expand = false;
-            w31.Fill = false;
+            Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
+            w36.Position = 9;
+            w36.Expand = false;
+            w36.Fill = false;
             this.Add(this.vbox2);
             if ((this.Child != null)) {
                 this.Child.ShowAll();
@@ -333,6 +400,7 @@ namespace LongoMatch.Gui.Component {
             this.crossbutton.Toggled += new System.EventHandler(this.OnCrossbuttonToggled);
             this.circlebutton.Toggled += new System.EventHandler(this.OnCirclebuttonToggled);
             this.combobox1.Changed += new System.EventHandler(this.OnCombobox1Changed);
+            this.spinbutton1.Changed += new System.EventHandler(this.OnSpinbutton1Changed);
             this.ybutton.Toggled += new System.EventHandler(this.OnButtonToggled);
             this.wbutton.Toggled += new System.EventHandler(this.OnButtonToggled);
             this.rbutton.Toggled += new System.EventHandler(this.OnButtonToggled);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs
index a7ef8cb..029008c 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs
@@ -45,6 +45,7 @@ namespace LongoMatch.Gui.Component {
             this.drawingarea.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnDrawingareaButtonReleaseEvent);
             this.drawingarea.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler(this.OnDrawingareaMotionNotifyEvent);
             this.drawingarea.SizeAllocated += new Gtk.SizeAllocatedHandler(this.OnDrawingareaSizeAllocated);
+            this.drawingarea.ConfigureEvent += new Gtk.ConfigureEventHandler(this.OnDrawingareaConfigureEvent);
         }
     }
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
index 7b7e2c8..76e58b1 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -67,6 +67,7 @@ namespace LongoMatch.Gui.Dialog {
             this.savebutton.Label = "gtk-save";
             this.vbox2.Add(this.savebutton);
             Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.savebutton]));
+            w3.PackType = ((Gtk.PackType)(1));
             w3.Position = 1;
             w3.Expand = false;
             w3.Fill = false;
@@ -105,7 +106,7 @@ namespace LongoMatch.Gui.Dialog {
                 this.Child.ShowAll();
             }
             this.DefaultWidth = 600;
-            this.DefaultHeight = 434;
+            this.DefaultHeight = 521;
             this.button271.Hide();
             this.Show();
             this.drawingtoolbox1.LineWidthChanged += new LongoMatch.Handlers.LineWidthChangedHandler(this.OnDrawingtoolbox1LineWidthChanged);
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index 4d536d5..db02e39 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -4053,7 +4053,7 @@ You can download it using this direct link:</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.DrawingToolBox" design-size="67 335">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.DrawingToolBox" design-size="86 440">
     <property name="MemberName" />
     <property name="Visible">False</property>
     <child>
@@ -4061,6 +4061,20 @@ You can download it using this direct link:</property>
         <property name="MemberName" />
         <property name="Spacing">6</property>
         <child>
+          <widget class="Gtk.Label" id="toolslabel">
+            <property name="MemberName" />
+            <property name="Xalign">0</property>
+            <property name="LabelProp" translatable="yes">&lt;b&gt;Tools&lt;/b&gt;</property>
+            <property name="UseMarkup">True</property>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
           <widget class="Gtk.Table" id="toolstable">
             <property name="MemberName" />
             <property name="NRows">3</property>
@@ -4072,6 +4086,7 @@ You can download it using this direct link:</property>
                 <property name="MemberName" />
                 <property name="CanFocus">True</property>
                 <property name="Label" translatable="yes" />
+                <property name="Active">True</property>
                 <property name="DrawIndicator">False</property>
                 <property name="HasLabel">False</property>
                 <property name="UseUnderline">True</property>
@@ -4251,12 +4266,26 @@ You can download it using this direct link:</property>
             </child>
           </widget>
           <packing>
-            <property name="Position">0</property>
+            <property name="Position">1</property>
             <property name="AutoSize">False</property>
             <property name="Expand">False</property>
           </packing>
         </child>
         <child>
+          <widget class="Gtk.Label" id="label3">
+            <property name="MemberName" />
+            <property name="Xalign">0</property>
+            <property name="LabelProp" translatable="yes">&lt;b&gt;Width&lt;/b&gt;</property>
+            <property name="UseMarkup">True</property>
+          </widget>
+          <packing>
+            <property name="Position">2</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
           <widget class="Gtk.ComboBox" id="combobox1">
             <property name="MemberName" />
             <property name="IsTextCombo">True</property>
@@ -4269,7 +4298,54 @@ You can download it using this direct link:</property>
             <signal name="Changed" handler="OnCombobox1Changed" />
           </widget>
           <packing>
-            <property name="Position">1</property>
+            <property name="Position">3</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Label" id="transparencylabel">
+            <property name="MemberName" />
+            <property name="Xalign">0</property>
+            <property name="LabelProp" translatable="yes">&lt;b&gt;Transparency&lt;/b&gt;</property>
+            <property name="UseMarkup">True</property>
+          </widget>
+          <packing>
+            <property name="Position">4</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.SpinButton" id="spinbutton1">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Upper">100</property>
+            <property name="PageIncrement">10</property>
+            <property name="StepIncrement">1</property>
+            <property name="ClimbRate">1</property>
+            <property name="Numeric">True</property>
+            <property name="Value">80</property>
+            <signal name="Changed" handler="OnSpinbutton1Changed" />
+          </widget>
+          <packing>
+            <property name="Position">5</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Label" id="colorslabel">
+            <property name="MemberName" />
+            <property name="Xalign">0</property>
+            <property name="LabelProp" translatable="yes">&lt;b&gt;Colors&lt;/b&gt;</property>
+            <property name="UseMarkup">True</property>
+          </widget>
+          <packing>
+            <property name="Position">6</property>
             <property name="AutoSize">True</property>
             <property name="Expand">False</property>
             <property name="Fill">False</property>
@@ -4286,6 +4362,7 @@ You can download it using this direct link:</property>
               <widget class="Gtk.RadioButton" id="bbutton">
                 <property name="MemberName" />
                 <property name="Label" translatable="yes" />
+                <property name="Active">True</property>
                 <property name="DrawIndicator">False</property>
                 <property name="HasLabel">True</property>
                 <property name="UseUnderline">True</property>
@@ -4430,7 +4507,7 @@ You can download it using this direct link:</property>
             </child>
           </widget>
           <packing>
-            <property name="Position">2</property>
+            <property name="Position">7</property>
             <property name="AutoSize">True</property>
             <property name="Expand">False</property>
             <property name="Fill">False</property>
@@ -4447,7 +4524,7 @@ You can download it using this direct link:</property>
             <signal name="Clicked" handler="OnClearbuttonClicked" />
           </widget>
           <packing>
-            <property name="Position">3</property>
+            <property name="Position">8</property>
             <property name="AutoSize">False</property>
             <property name="Expand">False</property>
             <property name="Fill">False</property>
@@ -4464,7 +4541,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
             <property name="UseMarkup">True</property>
           </widget>
           <packing>
-            <property name="Position">4</property>
+            <property name="Position">9</property>
             <property name="AutoSize">True</property>
             <property name="Expand">False</property>
             <property name="Fill">False</property>
@@ -4654,6 +4731,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
                 <signal name="ButtonReleaseEvent" handler="OnDrawingareaButtonReleaseEvent" />
                 <signal name="MotionNotifyEvent" handler="OnDrawingareaMotionNotifyEvent" />
                 <signal name="SizeAllocated" handler="OnDrawingareaSizeAllocated" />
+                <signal name="ConfigureEvent" handler="OnDrawingareaConfigureEvent" />
               </widget>
             </child>
           </widget>
@@ -4661,7 +4739,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DrawingTool" design-size="600 434">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DrawingTool" design-size="600 521">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Drawing Tool</property>
     <property name="Icon">resource:longomatch.png</property>
@@ -4712,6 +4790,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
                     <property name="label">gtk-save</property>
                   </widget>
                   <packing>
+                    <property name="PackType">End</property>
                     <property name="Position">1</property>
                     <property name="AutoSize">True</property>
                     <property name="Expand">False</property>
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 2e5855d..138059b 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -16,6 +16,7 @@
         <signal name="VisibilityChanged" />
         <signal name="ClearDrawing" />
         <signal name="DrawToolChanged" />
+        <signal name="TransparencyChanged" />
       </itemgroup>
     </signals>
   </object>
@@ -234,11 +235,11 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+  <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General" allow-children="false" base-type="Gtk.Window">
     <itemgroups />
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General" allow-children="false" base-type="Gtk.Window">
+  <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
   </object>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]