style<*>: text render styles

This commit is contained in:
leo 2021-08-05 13:44:25 +08:00
parent 316344939a
commit 76a4e37736
31 changed files with 139 additions and 144 deletions

View file

@ -30,5 +30,4 @@
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button}"/> <Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button}"/>
</ResourceDictionary> </ResourceDictionary>

View file

@ -7,6 +7,7 @@
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="MinHeight" Value="24"/> <Setter Property="MinHeight" Value="24"/>
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="TextElement.FontFamily" Value="Microsoft YaHei UI"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/> <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/> <Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>

View file

@ -4,6 +4,7 @@
<Style x:Key="Style.DataGridCell" TargetType="{x:Type DataGridCell}"> <Style x:Key="Style.DataGridCell" TargetType="{x:Type DataGridCell}">
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsSelected" Value="True"> <Trigger Property="IsSelected" Value="True">
@ -15,7 +16,6 @@
<Style x:Key="Style.DataGridRow" TargetType="{x:Type DataGridRow}"> <Style x:Key="Style.DataGridRow" TargetType="{x:Type DataGridRow}">
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsSelected" Value="True"> <Trigger Property="IsSelected" Value="True">
@ -44,7 +44,7 @@
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/> <Setter Property="Background" Value="Transparent"/>
<Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="TextElement.FontFamily" Value="Consolas"/> <Setter Property="TextElement.FontFamily" Value="Consolas,Microsoft YaHei UI"/>
<Setter Property="EnableColumnVirtualization" Value="True"/> <Setter Property="EnableColumnVirtualization" Value="True"/>
<Setter Property="EnableRowVirtualization" Value="True"/> <Setter Property="EnableRowVirtualization" Value="True"/>
<Setter Property="RowBackground" Value="Transparent"/> <Setter Property="RowBackground" Value="Transparent"/>

View file

@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Hyperlink}"> <Style TargetType="{x:Type Hyperlink}">
<Setter Property="TextDecorations" Value="{x:Null}"/> <Setter Property="TextDecorations" Value="{x:Null}"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/>

View file

@ -4,6 +4,7 @@
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="true"/> <Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}"> <ControlTemplate TargetType="{x:Type ListViewItem}">

View file

@ -5,6 +5,5 @@
<Setter Property="Fill" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Fill" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -46,9 +46,12 @@
ContentSource="Header" ContentSource="Header"
Margin="8,4"> Margin="8,4">
<ContentPresenter.Resources> <ContentPresenter.Resources>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}" BasedOn="{x:Null}">
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="FontWeight" Value="DemiBold"/> <Setter Property="FontWeight" Value="DemiBold"/>
<Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
<Setter Property="FontSize" Value="9pt"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected}" Value="True"> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected}" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/>

View file

@ -1,28 +1,52 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<Style TargetType="{x:Type TextBlock}"> xmlns:controls="clr-namespace:SourceGit.Views.Controls">
<Style x:Key="Style.TextBlock.Base" TargetType="{x:Type TextBlock}">
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="FontFamily" Value="Consolas,Microsoft YaHei UI"/>
<Setter Property="FontSize" Value="9pt"/> <Setter Property="FontSize" Value="9pt"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="HorizontalAlignment" Value="Left"/> <Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
</Style> </Style>
<Style x:Key="Style.TextBlock.LineNumber" TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}"/>
<Style x:Key="Style.TextBlock.Group" TargetType="{x:Type TextBlock}" BasedOn="{x:Null}">
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
<Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
<Setter Property="FontWeight" Value="ExtraBold"/>
<Setter Property="FontSize" Value="9pt"/> <Setter Property="FontSize" Value="9pt"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Margin" Value="8,0,0,0"/>
<Setter Property="HorizontalAlignment" Value="Right"/> <Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="Style.TextBlock.Header" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Group}">
<Setter Property="HorizontalAlignment" Value="Right"/>
</Style>
<Style x:Key="Style.TextBlock.LineNumber" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Padding" Value="8,0"/> <Setter Property="Padding" Value="8,0"/>
</Style> </Style>
<Style x:Key="Style.TextBlock.LineContent" TargetType="{x:Type TextBlock}"> <Style x:Key="Style.TextBlock.LineContent" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="Margin" Value="0"/>
<Setter Property="FontSize" Value="9pt"/> <Setter Property="Padding" Value="4,0,0,0"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> </Style>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Style TargetType="{x:Type controls:HighlightableTextBlock}" BasedOn="{StaticResource Style.TextBlock.Base}">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="LineHeight" Value="16"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="4,0,0,0"/> <Setter Property="Padding" Value="4,0,0,0"/>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -7,6 +7,7 @@
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextElement.FontFamily" Value="Consolas,Microsoft YaHei UI"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/> <Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="CaretBrush" Value="{DynamicResource Brush.FG1}"/> <Setter Property="CaretBrush" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="Background" Value="Transparent"/> <Setter Property="Background" Value="Transparent"/>
@ -67,6 +68,7 @@
Background="Transparent" Background="Transparent"
BorderThickness="0" BorderThickness="0"
IsTabStop="False" IsTabStop="False"
RenderOptions.ClearTypeHint="Enabled"
CanContentScroll="True" CanContentScroll="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border> </Border>

View file

@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type ToolTip}"> <Style TargetType="{x:Type ToolTip}">
<Setter Property="OverridesDefaultStyle" Value="True"/> <Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Setter Property="HasDropShadow" Value="False"/> <Setter Property="HasDropShadow" Value="False"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>

View file

@ -28,7 +28,7 @@
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, Mode=OneWay, FallbackValue=Stretch, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" /> <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, Mode=OneWay, FallbackValue=Stretch, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, Mode=OneWay, FallbackValue=Center, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" /> <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, Mode=OneWay, FallbackValue=Center, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" /> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type controls:TreeItem}"> <ControlTemplate TargetType="{x:Type controls:TreeItem}">

View file

@ -11,6 +11,7 @@
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/> <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="TextOptions.TextHintingMode" Value="Animated"/> <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/> <Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
<Setter Property="WindowChrome.WindowChrome"> <Setter Property="WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>

View file

@ -8,7 +8,7 @@
mc:Ignorable="d" mc:Ignorable="d"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
Title="{DynamicResource Text.About}" Title="{DynamicResource Text.About}"
Width="400" SizeToContent="Height" Width="420" SizeToContent="Height"
ResizeMode="NoResize"> ResizeMode="NoResize">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View file

@ -56,8 +56,8 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="txtFile" FontSize="11" Foreground="{DynamicResource Brush.FG2}" FontFamily="Consolas"/> <TextBlock Grid.Column="0" x:Name="txtFile" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Right" Foreground="{DynamicResource Brush.FG2}" FontFamily="11" Text="{DynamicResource Text.Blame.Tip}"/> <TextBlock Grid.Column="1" HorizontalAlignment="Right" Foreground="{DynamicResource Brush.FG2}" FontSize="11" Text="{DynamicResource Text.Blame.Tip}"/>
</Grid> </Grid>
</Border> </Border>
@ -73,7 +73,6 @@
RowHeight="16" RowHeight="16"
SelectionUnit="FullRow" SelectionUnit="FullRow"
SelectionMode="Single" SelectionMode="Single"
FontFamily="Consolas"
SizeChanged="OnViewerSizeChanged"> SizeChanged="OnViewerSizeChanged">
<DataGrid.RowStyle> <DataGrid.RowStyle>
@ -90,7 +89,7 @@
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Border Background="{Binding BG}" BorderThickness="0"> <Border Background="{Binding BG}" BorderThickness="0">
<TextBlock Text="{Binding Line.Content}" Background="Transparent" Foreground="{DynamicResource Brush.FG1}" FontFamily="Consolas,Microsoft YaHei UI" FontSize="9pt" Margin="0" Padding="2,0,0,0"/> <TextBlock Text="{Binding Line.Content}" Style="{DynamicResource Style.TextBlock.LineContent}"/>
</Border> </Border>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@ -106,7 +105,7 @@
Background="{DynamicResource Brush.Window}" Background="{DynamicResource Brush.Window}"
Visibility="Collapsed"> Visibility="Collapsed">
<Path Width="64" Height="64" Data="{StaticResource Icon.Error}" Fill="{DynamicResource Brush.FG2}"/> <Path Width="64" Height="64" Data="{StaticResource Icon.Error}" Fill="{DynamicResource Brush.FG2}"/>
<TextBlock Text="{DynamicResource Text.BlameTypeNotSupported}" Margin="0,16,0,0" FontFamily="Consolas" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Text="{DynamicResource Text.BlameTypeNotSupported}" Margin="0,16,0,0" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
<!-- Loading --> <!-- Loading -->

View file

@ -80,6 +80,7 @@ namespace SourceGit.Views.Controls {
public Avatar() { public Avatar() {
SetValue(RenderOptions.BitmapScalingModeProperty, BitmapScalingMode.HighQuality); SetValue(RenderOptions.BitmapScalingModeProperty, BitmapScalingMode.HighQuality);
SetValue(RenderOptions.ClearTypeHintProperty, ClearTypeHint.Auto);
Unloaded += (o, e) => Cancel(Email); Unloaded += (o, e) => Cancel(Email);
} }

View file

@ -97,7 +97,7 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" FontSize="9pt" FontFamily="Consolas"> <TextBlock Grid.Column="0">
<Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT"> <Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT">
<Run Text="{Binding ShortSHA, Mode=OneWay}"/> <Run Text="{Binding ShortSHA, Mode=OneWay}"/>
</Hyperlink> </Hyperlink>
@ -105,8 +105,7 @@
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
Text="{Binding Author.Time}" Text="{Binding Author.Time}"
FontSize="9pt" FontFamily="Consolas"
Foreground="{DynamicResource Brush.FG2}" Foreground="{DynamicResource Brush.FG2}"
Margin="4,0,0,0" Margin="4,0,0,0"
HorizontalAlignment="Right"/> HorizontalAlignment="Right"/>
@ -114,8 +113,7 @@
<TextBlock <TextBlock
Grid.Row="1" Grid.Row="1"
Text="{Binding Subject}" Text="{Binding Subject}"
FontSize="9pt" FontFamily="Consolas,Microsoft YaHei UI"
Margin="0,6,0,0"/> Margin="0,6,0,0"/>
</Grid> </Grid>
</Grid> </Grid>

View file

@ -74,7 +74,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="128"/> <ColumnDefinition Width="150"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>

View file

@ -84,7 +84,6 @@
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<TextBlock <TextBlock
FontSize="10pt" FontSize="10pt"
FontFamily="Consolas"
Padding="8" Padding="8"
VerticalAlignment="Top" VerticalAlignment="Top"
Foreground="{DynamicResource Brush.FG2}" Foreground="{DynamicResource Brush.FG2}"

View file

@ -71,10 +71,7 @@
BorderThickness="1" BorderThickness="1"
Background="{DynamicResource Brush.Contents}"> Background="{DynamicResource Brush.Contents}">
<Grid x:Name="layerChanges"> <Grid x:Name="layerChanges">
<controls:Tree <controls:Tree x:Name="modeTree" SelectionChanged="OnTreeSelectionChanged">
x:Name="modeTree"
FontFamily="Consolas"
SelectionChanged="OnTreeSelectionChanged">
<controls:Tree.ItemContainerStyle> <controls:Tree.ItemContainerStyle>
<Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}"> <Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
@ -106,8 +103,7 @@
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
Text="{Binding Path, Converter={StaticResource PureFileName}}" Text="{Binding Path, Converter={StaticResource PureFileName}}"
Margin="4,0,0,0" Margin="4,0,0,0"/>
FontSize="9pt"/>
</Grid> </Grid>
<HierarchicalDataTemplate.Triggers> <HierarchicalDataTemplate.Triggers>
@ -141,7 +137,7 @@
<DataGridTemplateColumn IsReadOnly="True"> <DataGridTemplateColumn IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@ -167,14 +163,14 @@
<DataGridTemplateColumn IsReadOnly="True"> <DataGridTemplateColumn IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path, Converter={StaticResource PureFileName}}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path, Converter={StaticResource PureFileName}}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn IsReadOnly="True"> <DataGridTemplateColumn IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="4,0,0,0" Text="{Binding Path, Converter={StaticResource PureFolderName}}" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Margin="4,0,0,0" Text="{Binding Path, Converter={StaticResource PureFolderName}}" Foreground="{DynamicResource Brush.FG2}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>

View file

@ -37,12 +37,12 @@
<!-- Author Info --> <!-- Author Info -->
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical"> <StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Author}" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.CommitViewer.Info.Author}" Margin="0"/>
<StackPanel Orientation="Horizontal" Margin="0,12,0,8"> <StackPanel Orientation="Horizontal" Margin="0,12,0,8">
<controls:TextEdit x:Name="txtAuthorName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/> <controls:TextEdit x:Name="txtAuthorName" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
<controls:TextEdit x:Name="txtAuthorEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}" Margin="4,0,0,0"/> <controls:TextEdit x:Name="txtAuthorEmail" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}" Margin="4,0,0,0"/>
</StackPanel> </StackPanel>
<controls:TextEdit x:Name="txtAuthorTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}"/> <controls:TextEdit x:Name="txtAuthorTime" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
<!-- Committer Avatar --> <!-- Committer Avatar -->
@ -54,12 +54,12 @@
<!-- Committer Info --> <!-- Committer Info -->
<StackPanel x:Name="committerInfoPanel" Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical"> <StackPanel x:Name="committerInfoPanel" Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Committer}" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.CommitViewer.Info.Committer}" Margin="0"/>
<StackPanel Orientation="Horizontal" Margin="0,12,0,8"> <StackPanel Orientation="Horizontal" Margin="0,12,0,8">
<controls:TextEdit x:Name="txtCommitterName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/> <controls:TextEdit x:Name="txtCommitterName" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
<controls:TextEdit x:Name="txtCommitterEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}" Margin="4,0,0,0"/> <controls:TextEdit x:Name="txtCommitterEmail" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}" Margin="4,0,0,0"/>
</StackPanel> </StackPanel>
<controls:TextEdit x:Name="txtCommitterTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}"/> <controls:TextEdit x:Name="txtCommitterTime" IsReadOnly="True" BorderThickness="0" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -83,26 +83,21 @@
<!-- SHA --> <!-- SHA -->
<TextBlock <TextBlock
Grid.Row="0" Grid.Column="0" Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" Style="{DynamicResource Style.TextBlock.Header}"
FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.SHA}"/>
Text="{DynamicResource Text.CommitViewer.Info.SHA}"
Foreground="{DynamicResource Brush.FG2}"/>
<controls:TextEdit <controls:TextEdit
Grid.Row="0" Grid.Column="1" Grid.Row="0" Grid.Column="1"
Height="24" Height="24"
x:Name="txtSHA" x:Name="txtSHA"
IsReadOnly="True" IsReadOnly="True"
BorderThickness="0" BorderThickness="0"
FontFamily="Consolas"
Margin="11,0,0,0"/> Margin="11,0,0,0"/>
<!-- PARENTS --> <!-- PARENTS -->
<TextBlock <TextBlock
Grid.Row="1" Grid.Column="0" Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" Style="{DynamicResource Style.TextBlock.Header}"
FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Parents}"/>
Text="{DynamicResource Text.CommitViewer.Info.Parents}"
Foreground="{DynamicResource Brush.FG2}"/>
<ItemsControl Grid.Row="1" Grid.Column="1" x:Name="listParents" Height="24" Margin="13,0,0,0"> <ItemsControl Grid.Row="1" Grid.Column="1" x:Name="listParents" Height="24" Margin="13,0,0,0">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
@ -112,7 +107,7 @@
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Margin="0,0,8,0" FontFamily="Consolas"> <TextBlock Margin="0,0,8,0">
<Hyperlink RequestNavigate="OnNavigateParent" NavigateUri="{Binding .}" ToolTip="{DynamicResource Text.Goto}"> <Hyperlink RequestNavigate="OnNavigateParent" NavigateUri="{Binding .}" ToolTip="{DynamicResource Text.Goto}">
<Run Text="{Binding .}"/> <Run Text="{Binding .}"/>
</Hyperlink> </Hyperlink>
@ -124,10 +119,8 @@
<!-- REFS --> <!-- REFS -->
<TextBlock <TextBlock
Grid.Row="2" Grid.Column="0" Grid.Row="2" Grid.Column="0"
HorizontalAlignment="Right" Style="{DynamicResource Style.TextBlock.Header}"
FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Refs}"/>
Text="{DynamicResource Text.CommitViewer.Info.Refs}"
Foreground="{DynamicResource Brush.FG2}"/>
<ItemsControl Grid.Row="2" Grid.Column="1" x:Name="listRefs" Height="24" Margin="11,0,0,0"> <ItemsControl Grid.Row="2" Grid.Column="1" x:Name="listRefs" Height="24" Margin="11,0,0,0">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
@ -143,7 +136,7 @@
</Border> </Border>
<Border x:Name="Color" Background="#FFFFB835"> <Border x:Name="Color" Background="#FFFFB835">
<TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black" FontFamily="Consolas"/> <TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black"/>
</Border> </Border>
</StackPanel> </StackPanel>
@ -166,17 +159,13 @@
<!-- Message --> <!-- Message -->
<TextBlock <TextBlock
Grid.Row="3" Grid.Column="0" Grid.Row="3" Grid.Column="0"
Margin="0,4,0,0" Style="{DynamicResource Style.TextBlock.Header}"
HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,0,0" VerticalAlignment="Top"
FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Message}"/>
Text="{DynamicResource Text.CommitViewer.Info.Message}"
Foreground="{DynamicResource Brush.FG2}"/>
<controls:TextEdit <controls:TextEdit
Grid.Row="3" Grid.Column="1" Grid.Row="3" Grid.Column="1"
x:Name="txtMessage" x:Name="txtMessage"
IsReadOnly="true" IsReadOnly="true"
FontFamily="Consolas,Microsoft YaHei UI"
FontSize="9pt"
BorderThickness="0" BorderThickness="0"
TextWrapping="Wrap" TextWrapping="Wrap"
Margin="11,5,16,0" Margin="11,5,16,0"
@ -195,11 +184,9 @@
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Margin="0,4,0,0" Style="{DynamicResource Style.TextBlock.Header}"
HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,0,0" VerticalAlignment="Top"
FontWeight="Bold" Text="{DynamicResource Text.CommitViewer.Info.Changed}"/>
Text="{DynamicResource Text.CommitViewer.Info.Changed}"
Foreground="{DynamicResource Brush.FG2}"/>
<DataGrid <DataGrid
Grid.Column="1" Grid.Column="1"
@ -223,7 +210,7 @@
<DataGridTemplateColumn Width="*" IsReadOnly="True"> <DataGridTemplateColumn Width="*" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>

View file

@ -27,13 +27,13 @@
<Button Click="Explore" Margin="6,0" ToolTip="{DynamicResource Text.Dashboard.Explore.Tip}" BorderThickness="0"> <Button Click="Explore" Margin="6,0" ToolTip="{DynamicResource Text.Dashboard.Explore.Tip}" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Folder.Open}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Folder.Open}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Dashboard.Explore}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Dashboard.Explore}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="Terminal" Margin="6,0" ToolTip="{DynamicResource Text.Dashboard.Terminal.Tip}" BorderThickness="0"> <Button Click="Terminal" Margin="6,0" ToolTip="{DynamicResource Text.Dashboard.Terminal.Tip}" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="13" Height="13" Data="{StaticResource Icon.Terminal}"/> <Path Width="13" Height="13" Data="{StaticResource Icon.Terminal}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Dashboard.Terminal}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Dashboard.Terminal}"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>
@ -42,31 +42,31 @@
<Button Click="OpenFetch" Margin="8,0" BorderThickness="0"> <Button Click="OpenFetch" Margin="8,0" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Fetch}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Fetch}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Fetch}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Fetch}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="OpenPull" Margin="8,0" BorderThickness="0"> <Button Click="OpenPull" Margin="8,0" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Pull}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Pull}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Pull}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Pull}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="OpenPush" Margin="8,0" BorderThickness="0"> <Button Click="OpenPush" Margin="8,0" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Push}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Push}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Push}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Push}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="OpenStash" Margin="8,0" BorderThickness="0"> <Button Click="OpenStash" Margin="8,0" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.SaveStash}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.SaveStash}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Stash}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Stash}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="OpenApply" Margin="8,0" BorderThickness="0"> <Button Click="OpenApply" Margin="8,0" BorderThickness="0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Apply}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Apply}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Apply}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Apply}"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>
@ -75,13 +75,13 @@
<Button Click="OpenSearch" Margin="6,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Search.Tip}"> <Button Click="OpenSearch" Margin="6,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Search.Tip}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Search}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Search}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Dashboard.Search}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Dashboard.Search}"/>
</StackPanel> </StackPanel>
</Button> </Button>
<Button Click="OpenConfigure" Margin="6,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Configure.Tip}"> <Button Click="OpenConfigure" Margin="6,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Configure.Tip}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icon.Setting}"/> <Path Width="14" Height="14" Data="{StaticResource Icon.Setting}"/>
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Configure}"/> <TextBlock Margin="4,0" FontWeight="Bold" FontSize="13" Text="{DynamicResource Text.Configure}"/>
</StackPanel> </StackPanel>
</Button> </Button>
</StackPanel> </StackPanel>
@ -118,12 +118,12 @@
</Grid.Resources> </Grid.Resources>
<!-- Workspace --> <!-- Workspace -->
<TextBlock Grid.Row="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.Workspace}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Row="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Workspace}"/>
<ListView Grid.Row="1" x:Name="workspace" SelectionMode="Single" SelectionChanged="OnPageSelectionChanged"> <ListView Grid.Row="1" x:Name="workspace" SelectionMode="Single" SelectionChanged="OnPageSelectionChanged">
<ListViewItem IsSelected="True"> <ListViewItem IsSelected="True">
<StackPanel Margin="16,0,0,0" Height="28" Orientation="Horizontal"> <StackPanel Margin="16,0,0,0" Height="28" Orientation="Horizontal">
<Path Width="16" Height="16" Data="{StaticResource Icon.Histories}"/> <Path Width="16" Height="16" Data="{StaticResource Icon.Histories}"/>
<TextBlock Margin="8,0,0,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Histories}"/> <TextBlock Margin="8,0,0,0" Text="{DynamicResource Text.Histories}"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
<ListViewItem> <ListViewItem>
@ -134,7 +134,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Send}"/> <Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Send}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy}"/> <TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.WorkingCopy}"/>
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeLocalChanges"/> <controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeLocalChanges"/>
</Grid> </Grid>
</ListViewItem> </ListViewItem>
@ -146,7 +146,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Stashes}"/> <Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Stashes}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{DynamicResource Text.Stashes}"/> <TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.Stashes}"/>
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeStashes"/> <controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeStashes"/>
</Grid> </Grid>
</ListViewItem> </ListViewItem>
@ -160,14 +160,13 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.LocalBranches}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.LocalBranches}"/>
<controls:IconButton Grid.Column="1" Click="OpenGitFlowPanel" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Flow}" ToolTip="{DynamicResource Text.GitFlow}"/> <controls:IconButton Grid.Column="1" Click="OpenGitFlowPanel" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Flow}" ToolTip="{DynamicResource Text.GitFlow}"/>
<controls:IconButton Grid.Column="2" Click="OpenNewBranch" Width="14" Height="14" Margin="0,0,2,0" Icon="{StaticResource Icon.Branch.Add}" ToolTip="{DynamicResource Text.Dashboard.NewBranch}"/> <controls:IconButton Grid.Column="2" Click="OpenNewBranch" Width="14" Height="14" Margin="0,0,2,0" Icon="{StaticResource Icon.Branch.Add}" ToolTip="{DynamicResource Text.Dashboard.NewBranch}"/>
</Grid> </Grid>
<controls:Tree <controls:Tree
Grid.Row="3" Grid.Row="3"
x:Name="localBranchTree" x:Name="localBranchTree"
FontFamily="Consolas"
MaxHeight="300" MaxHeight="300"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
@ -237,13 +236,12 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.Remotes}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Remotes}"/>
<controls:IconButton Grid.Column="1" Click="OpenAddRemote" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Remote.Add}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/> <controls:IconButton Grid.Column="1" Click="OpenAddRemote" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Remote.Add}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
</Grid> </Grid>
<controls:Tree <controls:Tree
Grid.Row="5" Grid.Row="5"
x:Name="remoteBranchTree" x:Name="remoteBranchTree"
FontFamily="Consolas"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
LostFocus="OnTreeLostFocus" LostFocus="OnTreeLostFocus"
@ -319,7 +317,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.Tags}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Tags}"/>
<TextBlock Grid.Column="1" x:Name="txtTagCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="1" x:Name="txtTagCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<controls:IconButton Grid.Column="2" Click="OpenNewTag" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Tag.Add}" ToolTip="{DynamicResource Text.Dashboard.Tags.Add}"/> <controls:IconButton Grid.Column="2" Click="OpenNewTag" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Tag.Add}" ToolTip="{DynamicResource Text.Dashboard.Tags.Add}"/>
</Grid> </Grid>
@ -376,7 +374,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.Submodules}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Submodules}"/>
<TextBlock Grid.Column="1" x:Name="txtSubmoduleCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="1" x:Name="txtSubmoduleCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<controls:IconButton Grid.Column="2" Click="OpenAddSubmodule" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Submodule}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/> <controls:IconButton Grid.Column="2" Click="OpenAddSubmodule" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Submodule}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
<Button Grid.Column="3" Click="UpdateSubmodules" Background="Transparent" Margin="0,0,4,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Submodules.Update}"> <Button Grid.Column="3" Click="UpdateSubmodules" Background="Transparent" Margin="0,0,4,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Submodules.Update}">
@ -426,7 +424,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="8,0,0,0" Text="{DynamicResource Text.Dashboard.SubTrees}" FontWeight="DemiBold" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.SubTrees}"/>
<TextBlock Grid.Column="1" x:Name="txtSubTreeCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Grid.Column="1" x:Name="txtSubTreeCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
<controls:IconButton Grid.Column="2" Click="OpenAddSubTree" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.TreeAddNode}" ToolTip="{DynamicResource Text.Dashboard.SubTrees.Add}"/> <controls:IconButton Grid.Column="2" Click="OpenAddSubTree" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.TreeAddNode}" ToolTip="{DynamicResource Text.Dashboard.SubTrees.Add}"/>
</Grid> </Grid>

View file

@ -32,13 +32,13 @@
<StackPanel Grid.Column="0" x:Name="orgFileNamePanel" Orientation="Horizontal"> <StackPanel Grid.Column="0" x:Name="orgFileNamePanel" Orientation="Horizontal">
<Path Width="10" Height="10" Data="{StaticResource Icon.File}"/> <Path Width="10" Height="10" Data="{StaticResource Icon.File}"/>
<TextBlock x:Name="txtOrgFileName" Margin="4,0,0,0" FontFamily="Consolas"/> <TextBlock x:Name="txtOrgFileName" Margin="4,0,0,0"/>
<TextBlock Margin="8,0" Text="→" FontFamily="Consolas"/> <TextBlock Margin="8,0" Text="→"/>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Column="1" Orientation="Horizontal">
<Path Width="10" Height="10" Data="{StaticResource Icon.File}"/> <Path Width="10" Height="10" Data="{StaticResource Icon.File}"/>
<TextBlock x:Name="txtFileName" Margin="4,0" FontFamily="Consolas"/> <TextBlock x:Name="txtFileName" Margin="4,0"/>
<controls:Loading x:Name="loading" Width="10" Height="10" Visibility="Collapsed"/> <controls:Loading x:Name="loading" Width="10" Height="10" Visibility="Collapsed"/>
</StackPanel> </StackPanel>
@ -84,7 +84,7 @@
</Grid> </Grid>
<Border x:Name="sizeChange" Grid.Row="1" Background="{DynamicResource Brush.Contents}"> <Border x:Name="sizeChange" Grid.Row="1" Background="{DynamicResource Brush.Contents}">
<StackPanel Orientation="Vertical" VerticalAlignment="Center" TextElement.FontFamily="Consolas"> <StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock <TextBlock
x:Name="txtSizeChangeTitle" x:Name="txtSizeChangeTitle"
Text="{DynamicResource Text.Diff.Binary}" Text="{DynamicResource Text.Diff.Binary}"
@ -137,7 +137,7 @@
<TextBlock <TextBlock
Margin="0,16,0,0" Margin="0,16,0,0"
Text="{DynamicResource Text.Diff.Welcome}" Text="{DynamicResource Text.Diff.Welcome}"
FontSize="18" FontWeight="UltraBold" TextOptions.TextFormattingMode="Ideal" FontSize="18" FontWeight="UltraBold"
Foreground="{DynamicResource Brush.FG2}" Foreground="{DynamicResource Brush.FG2}"
HorizontalAlignment="Center"/> HorizontalAlignment="Center"/>
</StackPanel> </StackPanel>

View file

@ -372,11 +372,6 @@ namespace SourceGit.Views.Widgets {
var line = new FrameworkElementFactory(typeof(Controls.HighlightableTextBlock)); var line = new FrameworkElementFactory(typeof(Controls.HighlightableTextBlock));
line.SetBinding(Controls.HighlightableTextBlock.DataProperty, new Binding(".")); line.SetBinding(Controls.HighlightableTextBlock.DataProperty, new Binding("."));
line.SetValue(TextBlock.FontFamilyProperty, new FontFamily("Consolas,Microsoft YaHei UI"));
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);
var colContent = new DataGridTemplateColumn(); var colContent = new DataGridTemplateColumn();
colContent.CellTemplate = new DataTemplate(); colContent.CellTemplate = new DataTemplate();

View file

@ -77,7 +77,7 @@
</Border> </Border>
<Border x:Name="Color" Background="#FFFFB835"> <Border x:Name="Color" Background="#FFFFB835">
<TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black" FontFamily="Consolas"/> <TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black"/>
</Border> </Border>
</StackPanel> </StackPanel>
@ -97,7 +97,7 @@
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
<TextBlock Text="{Binding Subject}" FontFamily="Consolas,Microsoft YaHei UI" FontSize="13" RenderOptions.ClearTypeHint="Enabled" Margin="2,0,0,0"/> <TextBlock Text="{Binding Subject}" FontSize="13" Margin="2,0,0,0"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@ -118,7 +118,7 @@
<DataGridTemplateColumn Width="80" IsReadOnly="True"> <DataGridTemplateColumn Width="80" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Committer.Name}" FontFamily="Consolas,Microsoft YaHei UI" FontSize="9pt" Margin="0,0,8,0"/> <TextBlock Text="{Binding Committer.Name}" Margin="0,0,8,0"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@ -126,7 +126,7 @@
<DataGridTemplateColumn Width="72" IsReadOnly="True"> <DataGridTemplateColumn Width="72" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding ShortSHA}" FontSize="9pt"/> <TextBlock Text="{Binding ShortSHA}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@ -134,7 +134,7 @@
<DataGridTemplateColumn Width="140" IsReadOnly="True"> <DataGridTemplateColumn Width="140" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Committer.Time}" FontSize="9pt"/> <TextBlock Text="{Binding Committer.Time}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@ -178,12 +178,11 @@
<TextBlock <TextBlock
x:Name="txtCounter" x:Name="txtCounter"
Margin="0,16" Margin="0,16"
FontFamily="Consolas" FontSize="24" FontWeight="UltraBold" FontSize="24" FontWeight="UltraBold"
HorizontalAlignment="Center" HorizontalAlignment="Center"
TextOptions.TextFormattingMode="Ideal"
Text="{DynamicResource Text.Histories.Guide}"/> Text="{DynamicResource Text.Histories.Guide}"/>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" TextBlock.FontFamily="Consolas,Microsoft YaHei UI"> <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<TextBlock Text="{DynamicResource Text.Histories.Guide_1}" FontSize="14" Margin="0,2"/> <TextBlock Text="{DynamicResource Text.Histories.Guide_1}" FontSize="14" Margin="0,2"/>
<TextBlock Text="{DynamicResource Text.Histories.Guide_2}" FontSize="14" Margin="0,2"/> <TextBlock Text="{DynamicResource Text.Histories.Guide_2}" FontSize="14" Margin="0,2"/>
<TextBlock Text="{DynamicResource Text.Histories.Guide_3}" FontSize="14" Margin="0,2"/> <TextBlock Text="{DynamicResource Text.Histories.Guide_3}" FontSize="14" Margin="0,2"/>

View file

@ -64,7 +64,6 @@
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
Margin="4,0" Margin="4,0"
FontFamily="Consolas"
FontWeight="Bold" FontWeight="Bold"
Text="{Binding Title}"/> Text="{Binding Title}"/>

View file

@ -24,7 +24,7 @@
<!-- Custom panel --> <!-- Custom panel -->
<Border x:Name="body"> <Border x:Name="body">
<StackPanel Margin="8" Orientation="Vertical"> <StackPanel Margin="8" Orientation="Vertical">
<TextBlock Margin="8,8,0,18" x:Name="txtTitle" FontSize="18" FontWeight="DemiBold" TextOptions.TextFormattingMode="Ideal"/> <TextBlock Margin="8,8,0,18" x:Name="txtTitle" FontSize="18" FontWeight="DemiBold" TextOptions.TextFormattingMode="Ideal" RenderOptions.ClearTypeHint="Enabled"/>
<ContentControl x:Name="container"/> <ContentControl x:Name="container"/>
<StackPanel Margin="0,16,0,0" Height="32" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Margin="0,16,0,0" Height="32" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Click="Sure" Width="80" Content="{DynamicResource Text.Sure}" BorderBrush="{DynamicResource Brush.FG1}" Background="{DynamicResource Brush.Accent1}"/> <Button Click="Sure" Width="80" Content="{DynamicResource Text.Sure}" BorderBrush="{DynamicResource Brush.FG1}" Background="{DynamicResource Brush.Accent1}"/>
@ -33,7 +33,6 @@
</StackPanel> </StackPanel>
</Border> </Border>
<!-- Progress mask --> <!-- Progress mask -->
<Border x:Name="mask" Visibility="Collapsed" Background="{DynamicResource Brush.Popup}" Opacity=".9"> <Border x:Name="mask" Visibility="Collapsed" Background="{DynamicResource Brush.Popup}" Opacity=".9">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">

View file

@ -42,7 +42,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.Row="0" TextBlock.FontSize="9pt" TextBlock.FontFamily="Consolas"> <Grid Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@ -52,7 +52,7 @@
<TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/> <TextBlock Grid.Column="1" x:Name="txtStartTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" x:Name="txtStartSubject" FontSize="10pt" FontFamily="Consolas,Microsoft YaHei UI" VerticalAlignment="Bottom"/> <TextBlock Grid.Row="1" x:Name="txtStartSubject" FontSize="10pt" VerticalAlignment="Bottom"/>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>
@ -88,7 +88,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.Row="0" TextBlock.FontSize="9pt" TextBlock.FontFamily="Consolas"> <Grid Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@ -98,7 +98,7 @@
<TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/> <TextBlock Grid.Column="1" x:Name="txtEndTime" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" x:Name="txtEndSubject" FontSize="10pt" FontFamily="Consolas,Microsoft YaHei UI" VerticalAlignment="Bottom"/> <TextBlock Grid.Row="1" x:Name="txtEndSubject" FontSize="10pt" VerticalAlignment="Bottom"/>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>

View file

@ -22,16 +22,12 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="{DynamicResource Brush.Contents}" BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="1"> <Border Grid.Column="0" Background="{DynamicResource Brush.Contents}" BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="1">
<controls:Tree <controls:Tree x:Name="treeFiles" SelectionChanged="OnFilesSelectionChanged" ContextMenuOpening="OnFilesContextMenuOpening">
x:Name="treeFiles"
FontFamily="Consolas"
SelectionChanged="OnFilesSelectionChanged"
ContextMenuOpening="OnFilesContextMenuOpening">
<controls:Tree.ItemTemplate> <controls:Tree.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}"> <HierarchicalDataTemplate ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" Height="24"> <StackPanel Orientation="Horizontal" Height="24">
<Path x:Name="Icon" Width="14" Height="14" Data="{StaticResource Icon.File}"/> <Path x:Name="Icon" Width="14" Height="14" Data="{StaticResource Icon.File}"/>
<TextBlock Margin="6,0,0,0" FontSize="9pt" Text="{Binding Path, Converter={StaticResource PureFileName}}"/> <TextBlock Margin="6,0,0,0" Text="{Binding Path, Converter={StaticResource PureFileName}}"/>
</StackPanel> </StackPanel>
<HierarchicalDataTemplate.Triggers> <HierarchicalDataTemplate.Triggers>
@ -66,7 +62,6 @@
<Grid x:Name="layerTextPreview" Visibility="Collapsed" SizeChanged="OnTextPreviewSizeChanged"> <Grid x:Name="layerTextPreview" Visibility="Collapsed" SizeChanged="OnTextPreviewSizeChanged">
<DataGrid <DataGrid
x:Name="txtPreviewData" x:Name="txtPreviewData"
FontFamily="Consolas,Microsoft YaHei UI"
RowHeight="16" RowHeight="16"
RowStyle="{StaticResource Style.DataGridRow.TextPreview}" RowStyle="{StaticResource Style.DataGridRow.TextPreview}"
FrozenColumnCount="1" FrozenColumnCount="1"
@ -98,7 +93,7 @@
VerticalAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="Collapsed"> Visibility="Collapsed">
<Path x:Name="iconRevisionPreview" Width="64" Height="64" Data="{StaticResource Icon.Submodule}" Fill="{DynamicResource Brush.FG2}"/> <Path x:Name="iconRevisionPreview" Width="64" Height="64" Data="{StaticResource Icon.Submodule}" Fill="{DynamicResource Brush.FG2}"/>
<TextBlock x:Name="txtRevisionPreview" Margin="0,16,0,0" FontFamily="Consolas" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock x:Name="txtRevisionPreview" Margin="0,16,0,0" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -107,7 +102,7 @@
VerticalAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="Collapsed"> Visibility="Collapsed">
<Path Width="64" Height="64" Data="{StaticResource Icon.Error}" Fill="{DynamicResource Brush.FG2}"/> <Path Width="64" Height="64" Data="{StaticResource Icon.Error}" Fill="{DynamicResource Brush.FG2}"/>
<TextBlock Margin="0,16,0,0" Text="{DynamicResource Text.BinaryNotSupported}" FontFamily="Consolas" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Margin="0,16,0,0" Text="{DynamicResource Text.BinaryNotSupported}" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>

View file

@ -59,14 +59,14 @@
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate DataType="{x:Type models:Stash}"> <DataTemplate DataType="{x:Type models:Stash}">
<Border BorderBrush="{DynamicResource Brush.Border3}" BorderThickness="0,0,0,1" Background="Transparent" Padding="6" ContextMenuOpening="OnStashContextMenuOpening"> <Border BorderBrush="{DynamicResource Brush.Border3}" BorderThickness="0,0,0,1" Background="Transparent" Padding="6" ContextMenuOpening="OnStashContextMenuOpening">
<StackPanel Orientation="Vertical" TextElement.FontFamily="Consolas"> <StackPanel Orientation="Vertical">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding SHA}" Foreground="{DynamicResource Brush.FG2}" FontSize="11"/> <TextBlock Grid.Column="0" Text="{Binding SHA}" Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock Grid.Column="1" Text="{Binding Author.Time}" Foreground="{DynamicResource Brush.FG2}" FontSize="11"/> <TextBlock Grid.Column="1" Text="{Binding Author.Time}" Foreground="{DynamicResource Brush.FG2}"/>
</Grid> </Grid>
<TextBlock Text="{Binding Message}" Margin="0,8,0,0"/> <TextBlock Text="{Binding Message}" Margin="0,8,0,0"/>
</StackPanel> </StackPanel>
@ -112,7 +112,7 @@
<DataGridTemplateColumn Width="*" IsReadOnly="True"> <DataGridTemplateColumn Width="*" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>

View file

@ -14,7 +14,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Vertical" Width="420" HorizontalAlignment="Center" TextElement.FontFamily="Consolas"> <StackPanel Grid.Row="0" Orientation="Vertical" Width="420" HorizontalAlignment="Center">
<!-- Logo --> <!-- Logo -->
<Path <Path
Margin="0,48,0,0" Margin="0,48,0,0"
@ -70,13 +70,13 @@
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Text="{DynamicResource Text.Welcome.Repositories}" Text="{DynamicResource Text.Welcome.Repositories}"
FontSize="13pt" FontWeight="ExtraBold" FontFamily="Consolas,Microsoft YaHei UI" FontSize="13pt" FontWeight="ExtraBold"
Foreground="{DynamicResource Brush.FG2}"/> Foreground="{DynamicResource Brush.FG2}"/>
<TextBlock <TextBlock
Grid.Column="2" Grid.Column="2"
Text="{DynamicResource Text.Welcome.DragDrop}" Text="{DynamicResource Text.Welcome.DragDrop}"
FontSize="10pt" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt"
Foreground="{DynamicResource Brush.FG2}"/> Foreground="{DynamicResource Brush.FG2}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@ -128,7 +128,7 @@
<Path Grid.Column="0" Margin="2,0,0,0" x:Name="Icon" Width="16" Height="16" Data="{StaticResource Icon.Git}"/> <Path Grid.Column="0" Margin="2,0,0,0" x:Name="Icon" Width="16" Height="16" Data="{StaticResource Icon.Git}"/>
<StackPanel Grid.Column="1" x:Name="Contents" Orientation="Horizontal"> <StackPanel Grid.Column="1" x:Name="Contents" Orientation="Horizontal">
<TextBlock Margin="8,0" FontSize="9pt" FontFamily="Consolas,Microsoft YaHei UI" Text="{Binding Name}"/> <TextBlock Margin="8,0" Text="{Binding Name}"/>
<TextBlock x:Name="Path" Text="{Binding Id}" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock x:Name="Path" Text="{Binding Id}" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel> </StackPanel>

View file

@ -21,7 +21,6 @@
<Grid> <Grid>
<controls:Tree <controls:Tree
x:Name="modeTree" x:Name="modeTree"
FontFamily="Consolas"
MultiSelection="True" MultiSelection="True"
ItemsSource="{Binding ElementName=me, Path=Nodes}" ItemsSource="{Binding ElementName=me, Path=Nodes}"
SelectionChanged="OnTreeSelectionChanged" SelectionChanged="OnTreeSelectionChanged"
@ -58,8 +57,7 @@
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
Text="{Binding Path, Converter={StaticResource PureFileName}}" Text="{Binding Path, Converter={StaticResource PureFileName}}"
Margin="4,0,0,0" Margin="4,0,0,0"/>
FontSize="9pt"/>
</Grid> </Grid>
<HierarchicalDataTemplate.Triggers> <HierarchicalDataTemplate.Triggers>
@ -96,7 +94,7 @@
<DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells"> <DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
@ -125,14 +123,14 @@
<DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells"> <DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path, Converter={StaticResource PureFileName}}"/> <TextBlock Margin="2,0,0,0" Text="{Binding Path, Converter={StaticResource PureFileName}}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells"> <DataGridTemplateColumn IsReadOnly="True" Width="SizeToCells">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<TextBlock FontFamily="Consolas" Margin="8,0,0,0" Text="{Binding Path, Converter={StaticResource PureFolderName}}" Foreground="{DynamicResource Brush.FG2}"/> <TextBlock Margin="8,0,0,0" Text="{Binding Path, Converter={StaticResource PureFolderName}}" Foreground="{DynamicResource Brush.FG2}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>