aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/DebugLogAnalyzer
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
parent6c4bb7e2c26c3a4c612fdece4dee96282391007a (diff)
wip
Diffstat (limited to 'Samples/DebugLogAnalyzer')
-rw-r--r--Samples/DebugLogAnalyzer/src/DbgLogViewer.cs13
-rw-r--r--Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs2
-rw-r--r--Samples/DebugLogAnalyzer/ui/main.crow4
3 files changed, 6 insertions, 13 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)
diff --git a/Samples/DebugLogAnalyzer/ui/main.crow b/Samples/DebugLogAnalyzer/ui/main.crow
index 5afc6c6c..28433b11 100644
--- a/Samples/DebugLogAnalyzer/ui/main.crow
+++ b/Samples/DebugLogAnalyzer/ui/main.crow
@@ -70,11 +70,11 @@
</HorizontalStack>
<Label Background="Red" Foreground="White" Margin="5" Width="Stretched" Text="{../../../dbgIfaceWidget.CrowDebuggerErrorMessage}"
IsVisible="{../../../dbgIfaceWidget.CrowDebuggerNOK}"/>
- <!--<CheckBox Name="cbFile" Caption="Record to file" IsChecked="{²DebugLogToFile}" Background="Onyx"/>-->
<HorizontalStack Height="Fit" Width="Stretched" IsEnabled="{../cbFile.IsChecked}" Background="Onyx" Margin="5">
<Label Text="Debug log output file:" Fit="true"/>
<TextBox Text="{²../../../../dbgIfaceWidget.DebugLogFilePath}" />
</HorizontalStack>
+ <CheckBox Name="cbFile" Caption="Record to file" IsChecked="{²../../../dbgIfaceWidget.DebugLogToFile}" Background="Onyx"/>
<EnumSelector RadioButtonStyle="CheckBox2" Template="#Dbg.EnumSelector.template"
Background="Grey"
Caption="Recorded Events" EnumValue="{²RecordedEvents}" BitFieldExcludeMask="255" />
@@ -97,7 +97,7 @@
<Wrapper Orientation="Vertical" Name="ItemsContainer" Margin="0" Background="{./Background}"/>
</Template>
<ItemTemplate>
- <Button Command="{}" Height="Stretched" Width="Fit"/>
+ <Button Command="{}" Height="Fit" Width="Fit"/>
</ItemTemplate>
</Menu>
</HorizontalStack>