style<DiffViewer, RevisionFiles>: use 'Microsoft YaHei UI' for chinese characters

This commit is contained in:
leo 2021-07-29 22:22:02 +08:00
parent 59ec418b59
commit e7a139542e
2 changed files with 2 additions and 1 deletions

View file

@ -467,6 +467,7 @@ namespace SourceGit.Views.Widgets {
line.SetBinding(TextBlock.BackgroundProperty, new Binding("BG"));
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.MarginProperty, new Thickness(0));
line.SetValue(TextBlock.PaddingProperty, new Thickness(4, 0, 0, 0));

View file

@ -66,7 +66,7 @@
<Grid x:Name="layerTextPreview" Visibility="Collapsed" SizeChanged="OnTextPreviewSizeChanged">
<DataGrid
x:Name="txtPreviewData"
FontFamily="Consolas"
FontFamily="Consolas,Microsoft YaHei UI"
RowHeight="16"
RowStyle="{StaticResource Style.DataGridRow.TextPreview}"
FrozenColumnCount="1"