diff --git a/src/UI/Blame.xaml b/src/UI/Blame.xaml index c2186c63..f356c551 100644 --- a/src/UI/Blame.xaml +++ b/src/UI/Blame.xaml @@ -110,30 +110,49 @@ + + - + + + + + + - + + + + + + + + + + + + + + + + numbers = new List(); + for (int i = 0; i < blame.LineCount; i++) numbers.Add(i.ToString()); + lineNumber.ItemsSource = numbers; + + var fg = FindResource("Brush.FG") as SolidColorBrush; + var tf = new Typeface(content.FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal); + var ns = new NumberSubstitution(); + var mp = new Thickness(0); for (int i = 0; i < blame.Blocks.Count; i++) { var frag = blame.Blocks[i]; @@ -78,11 +82,11 @@ namespace SourceGit.UI { Paragraph p = new Paragraph(new Run(frag.Content)); p.DataContext = frag; - p.Margin = new Thickness(0); - p.Padding = new Thickness(0); + p.Margin = mp; + p.Padding = mp; p.LineHeight = 1; p.Background = BG[i % 2]; - p.Foreground = FindResource("Brush.FG") as SolidColorBrush; + p.Foreground = fg; p.FontStyle = FontStyles.Normal; p.ContextMenuOpening += (sender, ev) => { if (!content.Selection.IsEmpty) return; @@ -114,10 +118,10 @@ namespace SourceGit.UI { frag.Content, CultureInfo.CurrentUICulture, FlowDirection.LeftToRight, - new Typeface(content.FontFamily, p.FontStyle, p.FontWeight, p.FontStretch), + tf, content.FontSize, Brushes.Black, - new NumberSubstitution(), + ns, TextFormattingMode.Ideal); if (minWidth < formatter.Width) { content.Document.PageWidth = formatter.Width + 16;