aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/DebugLogAnalyzer/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-07-01 23:38:09 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-07-01 23:38:09 +0200
commita4386e4844dbb85b804770d936b2d47c7584d258 (patch)
tree85113f4aa66fa77f2e4cde0d4e02bc8eeadbd962 /Samples/DebugLogAnalyzer/src
parent6c4bb7e2c26c3a4c612fdece4dee96282391007a (diff)
wip
Diffstat (limited to 'Samples/DebugLogAnalyzer/src')
-rw-r--r--Samples/DebugLogAnalyzer/src/DbgLogViewer.cs13
-rw-r--r--Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs2
2 files changed, 4 insertions, 11 deletions
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<DbgWidgetRecord> widgets, DbgEvent evt) {
+ void updateWidgetEvents (IList<DbgWidgetRecord> widgets, DbgEvent evt) {
if (evt is DbgWidgetEvent we)
widgets.FirstOrDefault (w => w.InstanceIndex == we.InstanceIndex)?.Events.Add (we);
if (evt.Events == null)