style<*>: use mono font for all contents

This commit is contained in:
leo 2024-02-18 10:41:41 +08:00
parent 70512915f9
commit c73c5372d2
15 changed files with 67 additions and 64 deletions

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2021 sourcegit
Copyright (c) 2024 sourcegit
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View file

@ -8,7 +8,7 @@
<StreamGeometry x:Key="Icons.MacOS.Close">M851 755q0 23-16 39l-78 78q-16 16-39 16t-39-16l-168-168-168 168q-16 16-39 16t-39-16l-78-78q-16-16-16-39t16-39l168-168-168-168q-16-16-16-39t16-39l78-78q16-16 39-16t39 16l168 168 168-168q16-16 39-16t39 16l78 78q16 16 16 39t-16 39l-168 168 168 168q16 16 16 39z</StreamGeometry>
<StreamGeometry x:Key="Icons.TriangleLeft">M30 0 30 30 0 15z</StreamGeometry>
<StreamGeometry x:Key="Icons.TriangleRight">M0 0 0 30 30 15z</StreamGeometry>
<StreamGeometry x:Key="Icons.Menu">M194 236m-70 0a70 70 0 10140 0 70 70 0 10-140 0ZM348 166h552v140H348zM194 512m-70 0a70 70 0 10140 0 70 70 0 10-140 0ZM348 442h552v140H348zM194 788m-70 0a70 70 0 10140 0 70 70 0 10-140 0ZM348 719h552v140H348z</StreamGeometry>
<StreamGeometry x:Key="Icons.Menu">M192 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM192 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM864 160H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 480H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 800H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32z</StreamGeometry>
<StreamGeometry x:Key="Icons.Goback">M512 945c-238 0-433-195-433-433S274 79 512 79c238 0 433 195 433 433S750 945 512 945M512 0C228 0 0 228 0 512s228 512 512 512 512-228 512-512-228-512-512-512zM752 477H364l128-128a38 38 0 000-55 38 38 0 00-55 0l-185 183a55 55 0 00-16 39c0 16 6 30 16 39l185 185a39 39 0 0028 12 34 34 0 0028-14 38 38 0 000-55l-128-128h386c22 0 41-18 41-39a39 39 0 00-39-39</StreamGeometry>
<StreamGeometry x:Key="Icons.Orientation">M1231 0v372H120V0zM1352 484v56H0v-56zM1147 939H205V737h942v203M1231 1024V652H120V1024z</StreamGeometry>
<StreamGeometry x:Key="Icons.Error">M576 832C576 867 547 896 512 896 477 896 448 867 448 832 448 797 477 768 512 768 547 768 576 797 576 832ZM512 256C477 256 448 285 448 320L448 640C448 675 477 704 512 704 547 704 576 675 576 640L576 320C576 285 547 256 512 256ZM1024 896C1024 967 967 1024 896 1024L128 1024C57 1024 0 967 0 896 0 875 5 855 14 837L14 837 398 69 398 69C420 28 462 0 512 0 562 0 604 28 626 69L1008 835C1018 853 1024 874 1024 896ZM960 896C960 885 957 875 952 865L952 864 951 863 569 98C557 77 536 64 512 64 488 64 466 77 455 99L452 105 92 825 93 825 71 867C66 876 64 886 64 896 64 931 93 960 128 960L896 960C931 960 960 931 960 896Z</StreamGeometry>

View file

@ -181,17 +181,17 @@
<sys:String x:Key="Text.RepoCM.Open">Open</sys:String>
<sys:String x:Key="Text.RepoCM.Explore">Explore in File Manager</sys:String>
<sys:String x:Key="Text.BranchCM.Push">Push ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Push">Push${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.DiscardAll">Discard all changes</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">Fast-Forward to ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">Pull ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">Pull ${0}$ into ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">Checkout ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">Merge ${0}$ into ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">Rebase ${0}$ on ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">Git Flow - Finish ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">Rename ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">Delete ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">Fast-Forward to${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">Pull${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">Pull${0}$into${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">Checkout${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">Merge${0}$into${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">Rebase${0}$on${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">Git Flow - Finish${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">Rename${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">Delete${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Tracking">Tracking ...</sys:String>
<sys:String x:Key="Text.BranchCM.CopyName">Copy Branch Name</sys:String>
<sys:String x:Key="Text.BranchCM.UnsetUpstream">Unset Upstream</sys:String>
@ -203,8 +203,8 @@
<sys:String x:Key="Text.RemoteCM.Delete">Delete ...</sys:String>
<sys:String x:Key="Text.RemoteCM.CopyURL">Copy URL</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">Reset ${0}$ to Here</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">Rebase ${0}$ to Here</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">Reset${0}$to Here</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">Rebase${0}$to Here</sys:String>
<sys:String x:Key="Text.CommitCM.CherryPick">Cherry-Pick This Commit</sys:String>
<sys:String x:Key="Text.CommitCM.Reword">Reword</sys:String>
<sys:String x:Key="Text.CommitCM.Squash">Squash Into Parent</sys:String>
@ -212,8 +212,8 @@
<sys:String x:Key="Text.CommitCM.SaveAsPatch">Save as Patch ...</sys:String>
<sys:String x:Key="Text.CommitCM.CopySHA">Copy SHA</sys:String>
<sys:String x:Key="Text.TagCM.Push">Push ${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Delete">Delete ${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Push">Push${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Delete">Delete${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Copy">Copy Tag Name</sys:String>
<sys:String x:Key="Text.StashCM.Apply">Apply</sys:String>

View file

@ -180,17 +180,17 @@
<sys:String x:Key="Text.RepoCM.Open">打开</sys:String>
<sys:String x:Key="Text.RepoCM.Explore">在浏览器中查看</sys:String>
<sys:String x:Key="Text.BranchCM.Push">推送 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Push">推送${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.DiscardAll">放弃所有更改</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">快进到 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">拉回 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">拉回 ${0}$ 内容至 ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">检出 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">合并 ${0}$ ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">变基 ${0}$ 分支至 ${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">GIT工作流 - 完成 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">重命名 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">删除 ${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">快进到${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">拉回${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">拉回${0}$内容至${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">检出${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">合并${0}$到${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">变基${0}$分支至${1}$</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">GIT工作流 - 完成${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">重命名${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">删除${0}$</sys:String>
<sys:String x:Key="Text.BranchCM.Tracking">切换上游分支...</sys:String>
<sys:String x:Key="Text.BranchCM.CopyName">复制分支名</sys:String>
<sys:String x:Key="Text.BranchCM.UnsetUpstream">取消追踪</sys:String>
@ -202,8 +202,8 @@
<sys:String x:Key="Text.RemoteCM.Delete">删除 ...</sys:String>
<sys:String x:Key="Text.RemoteCM.CopyURL">复制远程地址</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">重置 ${0}$ 到此处</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">变基 ${0}$ 到此处</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">重置${0}$到此处</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">变基${0}$到此处</sys:String>
<sys:String x:Key="Text.CommitCM.CherryPick">挑选此提交</sys:String>
<sys:String x:Key="Text.CommitCM.Reword">编辑提交信息</sys:String>
<sys:String x:Key="Text.CommitCM.Squash">合并此提交到上一个提交</sys:String>
@ -211,8 +211,8 @@
<sys:String x:Key="Text.CommitCM.SaveAsPatch">另存为补丁 ...</sys:String>
<sys:String x:Key="Text.CommitCM.CopySHA">复制提交指纹</sys:String>
<sys:String x:Key="Text.TagCM.Push">推送 ${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Delete">删除 ${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Push">推送${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Delete">删除${0}$</sys:String>
<sys:String x:Key="Text.TagCM.Copy">复制标签名</sys:String>
<sys:String x:Key="Text.StashCM.Apply">应用</sys:String>

View file

@ -52,7 +52,7 @@
<Grid RowDefinitions="24,Auto,Auto,Auto" ColumnDefinitions="96,*">
<!-- SHA -->
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.SHA}" />
<SelectableTextBlock Grid.Row="0" Grid.Column="1" Text="{Binding SHA}" Margin="12,0,0,0" FontSize="12" VerticalAlignment="Center"/>
<SelectableTextBlock Grid.Row="0" Grid.Column="1" Text="{Binding SHA}" Margin="12,0,0,0" FontSize="12" VerticalAlignment="Center" FontFamily="{StaticResource JetBrainsMono}"/>
<!-- PARENTS -->
<TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Parents}" IsVisible="{Binding Parents.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/>
@ -67,6 +67,7 @@
<DataTemplate>
<TextBlock Text="{Binding, Converter={x:Static c:StringConverters.ToShortSHA}}"
FontSize="12"
FontFamily="{StaticResource JetBrainsMono}"
Foreground="DarkOrange"
TextDecorations="Underline"
Margin="0,0,16,0"
@ -92,7 +93,7 @@
<Path Width="8" Height="8" Stretch="Fill" Data="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToIcon}}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
</Border>
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
<TextBlock Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
<TextBlock Text="{Binding Name}" FontSize="10" FontFamily="{StaticResource JetBrainsMono}" Margin="4,0" Foreground="Black"/>
</Border>
</StackPanel>
</Border>
@ -103,7 +104,7 @@
<!-- Messages -->
<TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" />
<ScrollViewer Grid.Row="3" Grid.Column="1" Margin="12,4,0,0" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<SelectableTextBlock Text="{Binding FullMessage}" FontSize="12" TextWrapping="Wrap"/>
<SelectableTextBlock Text="{Binding FullMessage}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" TextWrapping="Wrap"/>
</ScrollViewer>
</Grid>

View file

@ -77,7 +77,7 @@
<DataGridTemplateColumn Width="*" Header="PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -112,7 +112,7 @@
<DataGridTemplateColumn Header="FILE_NAME">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" />
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -120,7 +120,7 @@
<DataGridTemplateColumn Header="FOLDER_PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -145,7 +145,7 @@
<Grid Height="24" ColumnDefinitions="Auto,*">
<Path Grid.Column="0" Classes="folder_icon" Width="14" Height="14" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" Fill="Goldenrod" VerticalAlignment="Center"/>
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" IconFontFamily="{StaticResource JetBrainsMono}" IsVisible="{Binding !IsFolder}"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
</Grid>
</TreeDataTemplate>
</TreeView.ItemTemplate>

View file

@ -50,7 +50,7 @@
<DataGridTemplateColumn Width="*" Header="PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path}" Margin="8,0,0,0" FontSize="12"/>
<TextBlock Text="{Binding Path}" Margin="8,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

View file

@ -16,13 +16,13 @@
<Grid ColumnDefinitions="Auto,*,Auto">
<StackPanel Grid.Column="0" Orientation="Horizontal" IsVisible="{Binding IsOrgFilePathVisible}" VerticalAlignment="Center">
<Path Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/>
<TextBlock Margin="4,0,0,0" Text="{Binding OrgFilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/>
<TextBlock Margin="4,0,0,0" Text="{Binding OrgFilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11" FontFamily="{StaticResource JetBrainsMono}"/>
<TextBlock Margin="8,0,0,0" Text="→"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="1" Margin="4,0,0,0" Text="{Binding FilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/>
<TextBlock Grid.Column="1" Margin="4,0,0,0" Text="{Binding FilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11" FontFamily="{StaticResource JetBrainsMono}"/>
<Path Grid.Column="2" Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{DynamicResource Icons.Loading}" IsVisible="{Binding IsLoading}"/>
</StackPanel>

View file

@ -80,12 +80,12 @@
IsHitTestVisible="False"
User="{Binding Author}"
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding Author.Name}" FontFamily="{StaticResource JetBrainsMono}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" Cursor="Hand" PointerPressed="OnPressedSHA" FontFamily="{StaticResource JetBrainsMono}"/>
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
</Grid>
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" VerticalAlignment="Bottom"/>
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
</Grid>
</Border>
</DataTemplate>

View file

@ -50,7 +50,7 @@
<Path Width="8" Height="8" Stretch="Fill" Data="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToIcon}}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
</Border>
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
<TextBlock Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
<TextBlock Text="{Binding Name}" FontSize="10" FontFamily="{StaticResource JetBrainsMono}" Margin="4,0" Foreground="Black"/>
</Border>
</StackPanel>
</Border>
@ -58,7 +58,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
<TextBlock Text="{Binding Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
</StackPanel>
</Border>
</DataTemplate>

View file

@ -37,7 +37,7 @@
<!-- Menu (Windows) -->
<Button Grid.Column="0"
Classes="icon_button"
Margin="8,0,2,0"
Margin="8,0,2,3"
VerticalAlignment="Bottom"
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
<Button.Flyout>
@ -54,7 +54,7 @@
</MenuItem>
</MenuFlyout>
</Button.Flyout>
<Path Width="14" Height="14" Data="{StaticResource Icons.Menu}"/>
<Path Width="12" Height="12" Data="{StaticResource Icons.Menu}"/>
</Button>
<!-- Pages Tabs-->
@ -160,12 +160,14 @@
TextAlignment="Center"
Text="{Binding Node.Name}"
IsVisible="{Binding Node.IsRepository}"
FontFamily="{StaticResource JetBrainsMono}"
IsHitTestVisible="False"/>
<TextBlock Grid.Column="1"
HorizontalAlignment="Stretch" VerticalAlignment="Center"
TextAlignment="Center"
Text="{DynamicResource Text.PageTabBar.Welcome.Title}"
IsVisible="{Binding !Node.IsRepository}"
FontFamily="{StaticResource JetBrainsMono}"
IsHitTestVisible="False"/>
<Button Grid.Column="2"
Classes="icon_button"

View file

@ -64,7 +64,7 @@ namespace SourceGit.Views {
if (string.IsNullOrEmpty(text)) return;
var normalTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Normal, FontStretch.Normal);
var highlightTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Bold, FontStretch.Normal);
//var highlightTypeface = new Typeface(FontFamily, FontStyle.Normal, FontWeight.Bold, FontStretch.Normal);
var underlinePen = new Pen(Foreground, 1);
var offsetX = 0.0;
@ -80,20 +80,20 @@ namespace SourceGit.Views {
part,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
isName ? highlightTypeface : normalTypeface,
//isName ? highlightTypeface : normalTypeface,
normalTypeface,
FontSize,
Foreground);
context.DrawText(formatted, new Point(offsetX, 0));
if (isName) {
var lineY = formatted.Baseline + 2;
offsetX += 4;
context.DrawText(formatted, new Point(offsetX, 0));
context.DrawLine(underlinePen, new Point(offsetX, lineY), new Point(offsetX + formatted.Width, lineY));
offsetX += formatted.Width;
offsetX += formatted.Width + 4;
} else {
context.DrawText(formatted, new Point(offsetX, 0));
offsetX += formatted.Width;
if (part.StartsWith(' ')) offsetX += 2;
if (part.EndsWith(' ')) offsetX += 4;
}
isName = !isName;

View file

@ -63,7 +63,7 @@
<Grid Height="24" ColumnDefinitions="Auto,*">
<Path Grid.Column="0" Classes="folder_icon" Width="14" Height="14" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" Fill="Goldenrod" VerticalAlignment="Center"/>
<Path Grid.Column="0" Width="14" Height="14" IsVisible="{Binding !IsFolder}" Data="{StaticResource Icons.File}" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
</Grid>
</TreeDataTemplate>
</TreeView.ItemTemplate>

View file

@ -69,7 +69,7 @@
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
</Grid>
<TextBlock Grid.Row="1" Text="{Binding Message}" FontSize="12" VerticalAlignment="Bottom"/>
<TextBlock Grid.Row="1" Text="{Binding Message}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
</Grid>
</Border>
</DataTemplate>
@ -113,7 +113,7 @@
<DataGridTemplateColumn Width="*" Header="PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

View file

@ -86,7 +86,7 @@
<DataGridTemplateColumn Width="*" Header="PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -122,7 +122,7 @@
<DataGridTemplateColumn Header="FILE_NAME">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" />
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -130,7 +130,7 @@
<DataGridTemplateColumn Header="FOLDER_PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -158,7 +158,7 @@
<Grid Height="24" ColumnDefinitions="Auto,*">
<Path Grid.Column="0" Classes="folder_icon" Width="14" Height="14" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" Fill="Goldenrod" VerticalAlignment="Center"/>
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding Backend}" IconFontFamily="{StaticResource JetBrainsMono}" IsVisible="{Binding !IsFolder}"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
</Grid>
</TreeDataTemplate>
</TreeView.ItemTemplate>
@ -211,7 +211,7 @@
<DataGridTemplateColumn Width="*" Header="PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -247,7 +247,7 @@
<DataGridTemplateColumn Header="FILE_NAME">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" />
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -255,7 +255,7 @@
<DataGridTemplateColumn Header="FOLDER_PATH">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@ -283,7 +283,7 @@
<Grid Height="24" ColumnDefinitions="Auto,*">
<Path Grid.Column="0" Classes="folder_icon" Width="14" Height="14" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" Fill="Goldenrod" VerticalAlignment="Center"/>
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" IconFontFamily="{StaticResource JetBrainsMono}" IsVisible="{Binding !IsFolder}"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
<TextBlock Grid.Column="1" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
</Grid>
</TreeDataTemplate>
</TreeView.ItemTemplate>