From f5bc2937ed0a18f20d76c5ea346c285304321240 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 30 Jul 2021 12:21:11 +0800 Subject: [PATCH] style: text render options --- src/Views/Widgets/DiffViewer.xaml.cs | 3 ++- src/Views/Widgets/Histories.xaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Views/Widgets/DiffViewer.xaml.cs b/src/Views/Widgets/DiffViewer.xaml.cs index 739f49b3..c34cdeae 100644 --- a/src/Views/Widgets/DiffViewer.xaml.cs +++ b/src/Views/Widgets/DiffViewer.xaml.cs @@ -468,12 +468,13 @@ namespace SourceGit.Views.Widgets { line.SetBinding(TextBlock.ForegroundProperty, new Binding("FG")); line.SetBinding(TextBlock.FontStyleProperty, new Binding("Style")); line.SetValue(TextBlock.FontFamilyProperty, new FontFamily("Consolas,Microsoft YaHei UI")); - line.SetValue(TextBlock.FontSizeProperty, new FontSizeConverter().ConvertFrom("9pt")); + line.SetValue(TextBlock.FontSizeProperty, 13.0); line.SetValue(TextBlock.MarginProperty, new Thickness(0)); line.SetValue(TextBlock.PaddingProperty, new Thickness(4, 0, 0, 0)); line.SetValue(TextBlock.LineHeightProperty, 16.0); line.SetValue(TextOptions.TextFormattingModeProperty, TextFormattingMode.Display); line.SetValue(TextOptions.TextRenderingModeProperty, TextRenderingMode.ClearType); + line.SetValue(RenderOptions.ClearTypeHintProperty, ClearTypeHint.Enabled); var colContent = new DataGridTemplateColumn(); colContent.CellTemplate = new DataTemplate(); diff --git a/src/Views/Widgets/Histories.xaml b/src/Views/Widgets/Histories.xaml index 7307383f..1e465ca7 100644 --- a/src/Views/Widgets/Histories.xaml +++ b/src/Views/Widgets/Histories.xaml @@ -97,7 +97,7 @@ - +