From 45a7a8a40da1231f00c2fcd15b370dabe71e3f8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Wed, 27 Dec 2017 11:46:55 +0100 Subject: [PATCH] replace Debug.WriteLine with console --- Crow.csproj | 2 +- Default.style | 4 ++-- Tests/BasicTests.cs | 6 +++--- Tests/GOLIBTest_DirViewer.cs | 2 +- Tests/OpenGL/Shader.cs | 14 +++++++------- Tests/OpenGL/Texture.cs | 2 +- Tests/Showcase.cs | 2 +- src/Cairo/CairoHelpers.cs | 3 --- src/GraphicObjects/GraphicObject.cs | 2 +- 9 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Crow.csproj b/Crow.csproj index 1f3aacda..fa34f37f 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -30,7 +30,7 @@ true full true - DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG0;__linux__;MEASURE_TIME0;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0 + DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG;__linux__;MEASURE_TIME0;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0 false diff --git a/Default.style b/Default.style index 0db6a08a..8deb2580 100644 --- a/Default.style +++ b/Default.style @@ -107,8 +107,8 @@ Scroller { } Icon { Margin=1; - Width=12; - Height=12; + Width=16; + Height=16; } Control { Margin=0; diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index 8d0a8026..a14b5154 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -202,7 +202,7 @@ namespace Tests GraphicObject obj = Load (testFiles[idx]); obj.DataSource = this; } catch (Exception ex) { - Debug.WriteLine (ex.Message + ex.InnerException); + Console.WriteLine (ex.Message + ex.InnerException); } } // void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e) @@ -224,7 +224,7 @@ namespace Tests // try { // i = Instantiator.CreateFromImlFragment (e.Text); // } catch (Exception ex) { -// Debug.WriteLine (ex); +// Console.WriteLine (ex); // return; // } // lock (ifaceControl.CrowInterface.UpdateMutex) { @@ -261,7 +261,7 @@ namespace Tests NotifyValueChanged ("PropertyLessBinding", test); } void onNew(object sender, EventArgs e){ - Debug.WriteLine ("menu new clicked"); + Console.WriteLine ("menu new clicked"); } } } diff --git a/Tests/GOLIBTest_DirViewer.cs b/Tests/GOLIBTest_DirViewer.cs index f17afb9b..966c3976 100644 --- a/Tests/GOLIBTest_DirViewer.cs +++ b/Tests/GOLIBTest_DirViewer.cs @@ -87,7 +87,7 @@ namespace test2 } public void onMouseDown(object sender, MouseButtonEventArgs e) { - Debug.WriteLine (sender.ToString ()); + Console.WriteLine (sender.ToString ()); } void OnSelectedItemChanged (object sender, SelectionChangeEventArgs e) { diff --git a/Tests/OpenGL/Shader.cs b/Tests/OpenGL/Shader.cs index 6ae99b89..02ea82f6 100644 --- a/Tests/OpenGL/Shader.cs +++ b/Tests/OpenGL/Shader.cs @@ -209,8 +209,8 @@ namespace Crow GL.GetProgramInfoLog(pgmId, out info); if (!string.IsNullOrEmpty (info)) { - Debug.WriteLine ("Linkage:"); - Debug.WriteLine (info); + Console.WriteLine ("Linkage:"); + Console.WriteLine (info); } info = null; @@ -218,8 +218,8 @@ namespace Crow GL.ValidateProgram(pgmId); GL.GetProgramInfoLog(pgmId, out info); if (!string.IsNullOrEmpty (info)) { - Debug.WriteLine ("Validation:"); - Debug.WriteLine (info); + Console.WriteLine ("Validation:"); + Console.WriteLine (info); } GL.UseProgram (pgmId); @@ -302,14 +302,14 @@ namespace Crow string info; GL.GetShaderInfoLog(shader, out info); - Debug.WriteLine(info); + Console.WriteLine(info); int compileResult; GL.GetShader(shader, ShaderParameter.CompileStatus, out compileResult); if (compileResult != 1) { - Debug.WriteLine("Compile Error!"); - Debug.WriteLine(source); + Console.WriteLine("Compile Error!"); + Console.WriteLine(source); } } public override string ToString () diff --git a/Tests/OpenGL/Texture.cs b/Tests/OpenGL/Texture.cs index ce24808b..1656ad00 100644 --- a/Tests/OpenGL/Texture.cs +++ b/Tests/OpenGL/Texture.cs @@ -60,7 +60,7 @@ namespace Crow GL.GenerateMipmap (GenerateMipmapTarget.Texture2D); } catch (Exception ex) { - Debug.WriteLine ("Error loading texture: " + Map + ":" + ex.Message); + Console.WriteLine ("Error loading texture: " + Map + ":" + ex.Message); } } } diff --git a/Tests/Showcase.cs b/Tests/Showcase.cs index 4880ede5..402f6ea9 100644 --- a/Tests/Showcase.cs +++ b/Tests/Showcase.cs @@ -114,7 +114,7 @@ namespace Tests g.DataSource = this; } } catch (Exception ex) { - System.Diagnostics.Debug.WriteLine (ex.ToString ()); + System.Diagnostics.Console.WriteLine (ex.ToString ()); showError (ex); } } diff --git a/src/Cairo/CairoHelpers.cs b/src/Cairo/CairoHelpers.cs index 44060259..e2aec1ae 100644 --- a/src/Cairo/CairoHelpers.cs +++ b/src/Cairo/CairoHelpers.cs @@ -80,8 +80,6 @@ namespace Crow } public static void DrawRoundedRectangle(Cairo.Context gr, double x, double y, double width, double height, double radius) { - gr.Save(); - if ((radius > height / 2) || (radius > width / 2)) radius = min(height / 2, width / 2); @@ -94,7 +92,6 @@ namespace Crow gr.LineTo(x + radius, y + height); gr.Arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI); gr.ClosePath(); - gr.Restore(); } public static void StrokeRaisedRectangle(Cairo.Context gr, Rectangle r, double width = 1) { diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 6118e8c4..be41455f 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -546,7 +546,7 @@ namespace Crow RegisterForRedraw (); } } - [XmlAttributeAttribute()][DefaultValue("sans,10")] + [XmlAttributeAttribute()][DefaultValue("sans,12")] public virtual Font Font { get { return font; } set { -- 2.47.3