diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml
index 0dfedc9a..9077d500 100644
--- a/src/Views/Histories.axaml
+++ b/src/Views/Histories.axaml
@@ -131,6 +131,7 @@
diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs
index 4a214784..13f05aff 100644
--- a/src/Views/Histories.axaml.cs
+++ b/src/Views/Histories.axaml.cs
@@ -99,19 +99,18 @@ namespace SourceGit.Views
set => SetValue(BindingDataGridProperty, value);
}
- static CommitGraph()
+ public static readonly StyledProperty DotBrushProperty =
+ AvaloniaProperty.Register(nameof(DotBrush), Brushes.Transparent);
+
+ public IBrush DotBrush
{
- AffectsRender(BindingDataGridProperty, GraphProperty);
+ get => GetValue(DotBrushProperty);
+ set => SetValue(DotBrushProperty, value);
}
- protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ static CommitGraph()
{
- base.OnPropertyChanged(change);
-
- if (change.Property.Name == "ActualThemeVariant")
- {
- InvalidateVisual();
- }
+ AffectsRender(BindingDataGridProperty, GraphProperty, DotBrushProperty);
}
public override void Render(DrawingContext context)
@@ -153,11 +152,7 @@ namespace SourceGit.Views
DrawCurves(context, top, bottom);
// Draw connect dots
- Brush dotFill = null;
- if (App.Current.TryGetResource("Brush.Contents", App.Current.ActualThemeVariant, out object res) && res is SolidColorBrush)
- {
- dotFill = res as SolidColorBrush;
- }
+ IBrush dotFill = DotBrush;
foreach (var dot in graph.Dots)
{
if (dot.Center.Y < top)