From a4386e4844dbb85b804770d936b2d47c7584d258 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Thu, 1 Jul 2021 23:38:09 +0200 Subject: wip --- Samples/DebugLogAnalyzer/src/DbgLogViewer.cs | 13 +++---------- Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'Samples/DebugLogAnalyzer/src') diff --git a/Samples/DebugLogAnalyzer/src/DbgLogViewer.cs b/Samples/DebugLogAnalyzer/src/DbgLogViewer.cs index 251090ef..89cf3e0c 100644 --- a/Samples/DebugLogAnalyzer/src/DbgLogViewer.cs +++ b/Samples/DebugLogAnalyzer/src/DbgLogViewer.cs @@ -271,10 +271,7 @@ namespace Crow { base.onDraw (gr); - gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight); - gr.SetFontSize (Font.Size); - gr.FontOptions = Interface.FontRenderingOptions; - gr.Antialias = Cairo.Antialias.None; + setFontForContext (gr); if (widgets == null) return; @@ -387,10 +384,7 @@ namespace Crow } } - ctx.SelectFontFace (Font.Name, Font.Slant, Font.Wheight); - ctx.SetFontSize (Font.Size); - ctx.FontOptions = Interface.FontRenderingOptions; - ctx.Antialias = Interface.Antialias; + setFontForContext (ctx); string str = ticksToMS(hoverTick); @@ -609,8 +603,7 @@ namespace Crow using (Context gr = new Context (IFace.surf)) { double maxNameWidth = 0.0; - gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight); - gr.SetFontSize (Font.Size); + setFontForContext (gr); foreach (DbgWidgetRecord o in widgets) { double nameWidth = gr.TextExtents (o.name).Width + 5.0 * o.xLevel; diff --git a/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs b/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs index c8b27d7d..38d94f3d 100644 --- a/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs +++ b/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs @@ -427,7 +427,7 @@ namespace Crow Debugger.Break (); } } - void updateWidgetEvents (List widgets, DbgEvent evt) { + void updateWidgetEvents (IList widgets, DbgEvent evt) { if (evt is DbgWidgetEvent we) widgets.FirstOrDefault (w => w.InstanceIndex == we.InstanceIndex)?.Events.Add (we); if (evt.Events == null) -- cgit v1.3.1-4-g156e