mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
refactor: change the way loading custom fonts
This commit is contained in:
parent
636096c713
commit
f834af10a2
31 changed files with 136 additions and 183 deletions
|
@ -6,7 +6,6 @@
|
|||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Resources/Fonts.axaml"/>
|
||||
<ResourceInclude Source="/Resources/Icons.axaml"/>
|
||||
<ResourceInclude Source="/Resources/Themes.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
|
|
@ -4,6 +4,7 @@ using Avalonia.Controls.ApplicationLifetimes;
|
|||
using Avalonia.Data.Core.Plugins;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Fonts;
|
||||
using Avalonia.Styling;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
@ -41,15 +42,23 @@ namespace SourceGit {
|
|||
public static AppBuilder BuildAvaloniaApp() {
|
||||
var builder = AppBuilder.Configure<App>();
|
||||
builder.UsePlatformDetect();
|
||||
builder.ConfigureFonts(manager => {
|
||||
var monospace = new EmbeddedFontCollection(
|
||||
new Uri("fonts:SourceGit", UriKind.Absolute),
|
||||
new Uri("avares://SourceGit/Resources/Fonts", UriKind.Absolute));
|
||||
manager.AddFontCollection(monospace);
|
||||
});
|
||||
|
||||
if (OperatingSystem.IsWindows()) {
|
||||
builder.With(new FontManagerOptions() {
|
||||
DefaultFamilyName = "Microsoft YaHei UI",
|
||||
FontFallbacks = [
|
||||
new FontFallback { FontFamily = new FontFamily("Microsoft YaHei UI") }
|
||||
]
|
||||
});
|
||||
} else if (OperatingSystem.IsMacOS()) {
|
||||
builder.With(new FontManagerOptions() {
|
||||
DefaultFamilyName = "PingFang SC",
|
||||
FontFallbacks = [
|
||||
new FontFallback { FontFamily = new FontFamily("PingFang SC") }
|
||||
]
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<FontFamily x:Key="JetBrainsMono">avares://SourceGit/Resources/Fonts/JetBrainsMono-Regular.ttf#JetBrains Mono</FontFamily>
|
||||
<FontFamily x:Key="JetBrainsMonoBold">avares://SourceGit/Resources/Fonts/JetBrainsMono-Bold.ttf#JetBrains Mono</FontFamily>
|
||||
<FontFamily x:Key="JetBrainsMonoItalic">avares://SourceGit/Resources/Fonts/JetBrainsMono-Italic.ttf#JetBrains Mono</FontFamily>
|
||||
</ResourceDictionary>
|
|
@ -68,13 +68,7 @@
|
|||
<Setter Property="FontStyle" Value="Italic"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.monospace">
|
||||
<Setter Property="FontFamily" Value="{StaticResource JetBrainsMono}"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock[FontWeight=Bold].monospace">
|
||||
<Setter Property="FontFamily" Value="{StaticResource JetBrainsMonoBold}"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock[FontStyle=Italic].monospace">
|
||||
<Setter Property="FontFamily" Value="{StaticResource JetBrainsMonoItalic}"/>
|
||||
<Setter Property="FontFamily" Value="fonts:SourceGit#JetBrains Mono"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.group_header_label">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
|
||||
|
@ -400,7 +394,7 @@
|
|||
<Setter Property="Height" Value="26"/>
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}" />
|
||||
<Setter Property="TextElement.FontSize" Value="13"/>
|
||||
<Setter Property="TextElement.FontSize" Value="12"/>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -17,14 +17,6 @@ namespace SourceGit.Views {
|
|||
new GradientStops() { new GradientStop(Colors.Tomato, 0), new GradientStop(Color.FromRgb(252, 165, 150), 1) },
|
||||
];
|
||||
|
||||
public static readonly StyledProperty<FontFamily> FallbackFontFamilyProperty =
|
||||
AvaloniaProperty.Register<Avatar, FontFamily>(nameof(FallbackFontFamily));
|
||||
|
||||
public FontFamily FallbackFontFamily {
|
||||
get => GetValue(FallbackFontFamilyProperty);
|
||||
set => SetValue(FallbackFontFamilyProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<Models.User> UserProperty =
|
||||
AvaloniaProperty.Register<Avatar, Models.User>(nameof(User));
|
||||
|
||||
|
@ -34,7 +26,6 @@ namespace SourceGit.Views {
|
|||
}
|
||||
|
||||
static Avatar() {
|
||||
AffectsRender<Avatar>(FallbackFontFamilyProperty);
|
||||
UserProperty.Changed.AddClassHandler<Avatar>(OnUserPropertyChanged);
|
||||
}
|
||||
|
||||
|
@ -106,7 +97,7 @@ namespace SourceGit.Views {
|
|||
EndPoint = new RelativePoint(0, 1, RelativeUnit.Relative),
|
||||
};
|
||||
|
||||
var typeface = avatar.FallbackFontFamily == null ? Typeface.Default : new Typeface(avatar.FallbackFontFamily);
|
||||
var typeface = new Typeface("fonts:SourceGit#JetBrains Mono");
|
||||
|
||||
avatar._fallbackLabel = new FormattedText(
|
||||
placeholder,
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
BorderThickness="0"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||
FontSize="12"
|
||||
BlameData="{Binding Data}"/>
|
||||
|
||||
|
|
|
@ -63,22 +63,14 @@ namespace SourceGit.Views {
|
|||
set => SetValue(ChangeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<FontFamily> IconFontFamilyProperty =
|
||||
AvaloniaProperty.Register<Avatar, FontFamily>(nameof(IconFontFamily));
|
||||
|
||||
public FontFamily IconFontFamily {
|
||||
get => GetValue(IconFontFamilyProperty);
|
||||
set => SetValue(IconFontFamilyProperty, value);
|
||||
}
|
||||
|
||||
static ChangeStatusIcon() {
|
||||
AffectsRender<ChangeStatusIcon>(IsWorkingCopyChangeProperty, ChangeProperty, IconFontFamilyProperty);
|
||||
AffectsRender<ChangeStatusIcon>(IsWorkingCopyChangeProperty, ChangeProperty);
|
||||
}
|
||||
|
||||
public override void Render(DrawingContext context) {
|
||||
if (Change == null || Bounds.Width <= 0) return;
|
||||
|
||||
var typeface = IconFontFamily == null ? Typeface.Default : new Typeface(IconFontFamily);
|
||||
var typeface = new Typeface("fonts:SourceGit#JetBrains Mono");
|
||||
|
||||
IBrush background = null;
|
||||
string indicator;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Target.Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
@ -14,11 +14,7 @@
|
|||
<!-- Author & Committer -->
|
||||
<Grid ColumnDefinitions="96,*,96,*" Margin="0,8">
|
||||
<!-- Author -->
|
||||
<v:Avatar Grid.Column="0"
|
||||
Width="64" Height="64"
|
||||
HorizontalAlignment="Right"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
||||
User="{Binding Author}"/>
|
||||
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Author}"/>
|
||||
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
|
||||
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
||||
|
@ -29,12 +25,7 @@
|
|||
</StackPanel>
|
||||
|
||||
<!-- Committer -->
|
||||
<v:Avatar Grid.Column="2"
|
||||
Width="64" Height="64"
|
||||
HorizontalAlignment="Right"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
||||
User="{Binding Committer}"
|
||||
IsVisible="{Binding IsCommitterVisible}"/>
|
||||
<v:Avatar Grid.Column="2" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Committer}" IsVisible="{Binding IsCommitterVisible}"/>
|
||||
<StackPanel Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical" IsVisible="{Binding IsCommitterVisible}">
|
||||
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Committer}"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
||||
|
@ -52,7 +43,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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<SelectableTextBlock Grid.Row="0" Grid.Column="1" Text="{Binding SHA}" Margin="12,0,0,0" FontSize="12" VerticalAlignment="Center" FontFamily="fonts:SourceGit#JetBrains Mono"/>
|
||||
|
||||
<!-- 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}}"/>
|
||||
|
@ -65,9 +56,9 @@
|
|||
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||
<TextBlock Classes="monospace"
|
||||
Text="{Binding, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||
FontSize="12"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
Foreground="DarkOrange"
|
||||
TextDecorations="Underline"
|
||||
Margin="0,0,16,0"
|
||||
|
@ -93,7 +84,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" FontFamily="{StaticResource JetBrainsMono}" Margin="4,0" Foreground="Black"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
@ -104,7 +95,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,5,0,0" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<SelectableTextBlock Text="{Binding FullMessage}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" TextWrapping="Wrap"/>
|
||||
<SelectableTextBlock Text="{Binding FullMessage}" FontSize="12" FontFamily="fonts:SourceGit#JetBrains Mono" TextWrapping="Wrap"/>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -144,8 +144,8 @@
|
|||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||
<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" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
|
||||
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" IsVisible="{Binding !IsFolder}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="8,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="8,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
<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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Margin="4,0,0,0" Text="{Binding OrgFilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/>
|
||||
<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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<Path Grid.Column="2" Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{DynamicResource Icons.Loading}" IsVisible="{Binding IsLoading}"/>
|
||||
<Path Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" Margin="4,0,0,0" Text="{Binding FilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/>
|
||||
<Path Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{DynamicResource Icons.Loading}" IsVisible="{Binding IsLoading}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2" Margin="32,0,0,0" Orientation="Horizontal" IsVisible="{Binding IsTextDiff}" VerticalAlignment="Center">
|
||||
|
@ -64,20 +64,20 @@
|
|||
Foreground="{DynamicResource Brush.FG2}"
|
||||
HorizontalAlignment="Center"/>
|
||||
<Path Width="64" Height="64" Data="{StaticResource Icons.Binary}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto" TextElement.FontFamily="{StaticResource JetBrainsMono}">
|
||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto">
|
||||
<Border Grid.Row="0" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
|
||||
<TextBlock Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
|
||||
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding OldSize}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="monospace" Text="{Binding OldSize}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Accent1}" CornerRadius="8" VerticalAlignment="Center">
|
||||
<TextBlock Text="{DynamicResource Text.Diff.Binary.New}" Margin="8,0" FontSize="10"/>
|
||||
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.New}" Margin="8,0" FontSize="10"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding NewSize}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Classes="monospace" Text="{Binding NewSize}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
@ -91,20 +91,20 @@
|
|||
Foreground="{DynamicResource Brush.FG2}"
|
||||
HorizontalAlignment="Center"/>
|
||||
<Path Width="64" Height="64" Data="{StaticResource Icons.LFS}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto" TextElement.FontFamily="{StaticResource JetBrainsMono}">
|
||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto">
|
||||
<Border Grid.Row="0" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
|
||||
<TextBlock Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
|
||||
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Old.Size}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="monospace" Text="{Binding Old.Size}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Accent1}" CornerRadius="8" VerticalAlignment="Center">
|
||||
<TextBlock Text="{DynamicResource Text.Diff.Binary.New}" Margin="8,0" FontSize="10"/>
|
||||
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.New}" Margin="8,0" FontSize="10"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding New.Size}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Classes="monospace" Text="{Binding New.Size}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -76,17 +76,13 @@
|
|||
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto">
|
||||
<v:Avatar Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"
|
||||
User="{Binding Author}"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<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}"/>
|
||||
<v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" Classes="monospace" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" Cursor="Hand" PointerPressed="OnPressedSHA"/>
|
||||
<TextBlock Grid.Column="3" Classes="monospace" FontSize="12" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
|
||||
<TextBlock Grid.Row="1" Classes="monospace" Text="{Binding Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -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" FontFamily="{StaticResource JetBrainsMono}" Margin="4,0" Foreground="Black"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
@ -58,7 +58,7 @@
|
|||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Text="{Binding Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Subject}" FontSize="12" Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
@ -73,7 +73,6 @@
|
|||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"
|
||||
User="{Binding Author}"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
|
@ -82,9 +81,9 @@
|
|||
<DataGridTemplateColumn MaxWidth="100" Header="AUTHOR">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
||||
<TextBlock Text="{Binding Author.Name}"
|
||||
<TextBlock Classes="monospace"
|
||||
Text="{Binding Author.Name}"
|
||||
FontSize="11"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
Margin="0,0,8,0"
|
||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
</DataTemplate>
|
||||
|
@ -94,10 +93,10 @@
|
|||
<DataGridTemplateColumn Header="SHA">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
||||
<TextBlock Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||
<TextBlock Classes="monospace"
|
||||
Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||
FontSize="11"
|
||||
Margin="12,0"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
|
@ -106,10 +105,10 @@
|
|||
<DataGridTemplateColumn Header="TIME">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
||||
<TextBlock Text="{Binding CommitterTimeStr}"
|
||||
<TextBlock Classes="monospace"
|
||||
Text="{Binding CommitterTimeStr}"
|
||||
FontSize="11"
|
||||
Margin="8,0"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
|
|
|
@ -52,16 +52,16 @@
|
|||
Margin="0,0,0,8"/>
|
||||
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Ctrl+T" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="monospace" Text="Ctrl+T"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.NewTab}" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Ctrl+W" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Classes="monospace" Text="Ctrl+W" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CloseTab}" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Ctrl+Tab" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="monospace" Text="Ctrl+Tab"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.GotoNextTab}" />
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="ESC" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Classes="monospace" Text="ESC"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
|
||||
</Grid>
|
||||
|
||||
|
@ -72,19 +72,19 @@
|
|||
Margin="0,8"/>
|
||||
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Ctrl+F" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="monospace" Text="Ctrl+F"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.ToggleSearch}" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Ctrl+1" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Classes="monospace" Text="Ctrl+1"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.ViewHistories}" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Ctrl+2" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="monospace" Text="Ctrl+2"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.ViewChanges}" />
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Ctrl+3" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Classes="monospace" Text="Ctrl+3"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.ViewStashes}" />
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="SPACE" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="monospace" Text="SPACE"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.StageOrUnstageSelected}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
|
|
@ -159,18 +159,18 @@
|
|||
IsVisible="{Binding !Node.IsRepository}"
|
||||
IsHitTestVisible="False"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Classes="monospace"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
Text="{Binding Node.Name}"
|
||||
IsVisible="{Binding Node.IsRepository}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
IsHitTestVisible="False"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Classes="monospace"
|
||||
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"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<DataTemplate DataType="m:Commit">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -405,11 +405,10 @@
|
|||
<v:Avatar Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
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="2" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
User="{Binding Author}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="12" Classes="monospace" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" FontSize="12" Classes="monospace" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="3" FontSize="12" Classes="monospace" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="monospace" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Target.Subject}}" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
<v:Avatar Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"
|
||||
User="{Binding StartPoint.Author}"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding StartPoint.Author.Name}" FontFamily="{StaticResource JetBrainsMono}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" FontSize="12" Text="{Binding StartPoint.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" PointerPressed="OnPressedSHA"/>
|
||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding StartPoint.CommitterTimeStr}" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
User="{Binding StartPoint.Author}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding StartPoint.Author.Name}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" Classes="monospace" FontSize="12" Text="{Binding StartPoint.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" PointerPressed="OnPressedSHA"/>
|
||||
<TextBlock Grid.Column="3" Classes="monospace" FontSize="12" Text="{Binding StartPoint.CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding StartPoint.Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
|
||||
<TextBlock Grid.Row="1" Classes="monospace" Text="{Binding StartPoint.Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
@ -37,14 +36,13 @@
|
|||
<v:Avatar Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"
|
||||
User="{Binding EndPoint.Author}"
|
||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding EndPoint.Author.Name}" FontFamily="{StaticResource JetBrainsMono}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" FontSize="12" Text="{Binding EndPoint.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" FontFamily="{StaticResource JetBrainsMono}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" PointerPressed="OnPressedSHA" />
|
||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding EndPoint.CommitterTimeStr}" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
User="{Binding EndPoint.Author}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding EndPoint.Author.Name}" Margin="8,0,0,0"/>
|
||||
<TextBlock Grid.Column="2" Classes="monospace" FontSize="12" Text="{Binding EndPoint.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0" TextDecorations="Underline" PointerPressed="OnPressedSHA" />
|
||||
<TextBlock Grid.Column="3" Classes="monospace" FontSize="12" Text="{Binding EndPoint.CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding EndPoint.Subject}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
|
||||
<TextBlock Grid.Row="1" Classes="monospace" Text="{Binding EndPoint.Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
@ -110,7 +108,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -118,7 +116,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -145,7 +143,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -153,7 +151,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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -161,7 +159,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" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -185,8 +183,8 @@
|
|||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||
<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" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
|
||||
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" IsVisible="{Binding !IsFolder}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
|
|
|
@ -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" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
|
@ -89,7 +89,7 @@
|
|||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:RevisionTextFile">
|
||||
<v:RevisionTextFileView FontFamily="{StaticResource JetBrainsMono}" FontSize="12" Background="{DynamicResource Brush.Contents}"/>
|
||||
<v:RevisionTextFileView FontFamily="fonts:SourceGit#JetBrains Mono" FontSize="12" Background="{DynamicResource Brush.Contents}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:RevisionLFSObject">
|
||||
|
@ -98,7 +98,7 @@
|
|||
<Path Width="64" Height="64" Margin="0,24,0,0" Data="{StaticResource Icons.LFS}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<SelectableTextBlock Margin="0,16,0,0" Text="{Binding Object.Oid}" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<TextBlock Text="{Binding Object.Size}" Foreground="{DynamicResource Brush.FG2}" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Object.Size}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Text="{DynamicResource Text.Bytes}" Margin="8,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
|
|
@ -65,11 +65,11 @@
|
|||
|
||||
<Grid RowDefinitions="Auto,*" >
|
||||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" TextDecorations="Underline" Cursor="Hand" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="0" Classes="monospace" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" TextDecorations="Underline" Cursor="Hand"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding Message}" FontSize="12" FontFamily="{StaticResource JetBrainsMono}" VerticalAlignment="Bottom"/>
|
||||
<TextBlock Grid.Row="1" Classes="monospace" Text="{Binding Message}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -113,7 +113,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
|
@ -148,7 +148,6 @@
|
|||
<!-- Graph -->
|
||||
<v:Chart Grid.Row="0" Grid.Column="1"
|
||||
Margin="16,8,0,0"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
LineBrush="{DynamicResource Brush.FG1}"
|
||||
ShapeBrush="{DynamicResource Brush.Accent1}"
|
||||
Samples="{Binding Samples}"/>
|
||||
|
|
|
@ -9,14 +9,6 @@ using System.Globalization;
|
|||
|
||||
namespace SourceGit.Views {
|
||||
public class Chart : Control {
|
||||
public static readonly StyledProperty<FontFamily> FontFamilyProperty =
|
||||
AvaloniaProperty.Register<Chart, FontFamily>(nameof(FontFamily));
|
||||
|
||||
public FontFamily FontFamily {
|
||||
get => GetValue(FontFamilyProperty);
|
||||
set => SetValue(FontFamilyProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<IBrush> LineBrushProperty =
|
||||
AvaloniaProperty.Register<Chart, IBrush>(nameof(LineBrush), Brushes.Gray);
|
||||
|
||||
|
@ -74,7 +66,7 @@ namespace SourceGit.Views {
|
|||
maxV = (int)Math.Ceiling(maxV / 500.0) * 500;
|
||||
}
|
||||
|
||||
var typeface = new Typeface(FontFamily);
|
||||
var typeface = new Typeface("fonts:SourceGit#JetBrains Mono");
|
||||
var pen = new Pen(LineBrush, 1);
|
||||
var width = Bounds.Width;
|
||||
var height = Bounds.Height;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
BorderThickness="0"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||
FontSize="12"
|
||||
DiffData="{Binding}"
|
||||
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
BorderThickness="0"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||
FontSize="12"
|
||||
DiffData="{Binding}"/>
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
|||
BorderThickness="0"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||
FontSize="12"
|
||||
DiffData="{Binding}"/>
|
||||
</Grid>
|
||||
|
|
|
@ -138,9 +138,7 @@ namespace SourceGit.Views {
|
|||
public LineStyleTransformer(CombinedTextDiffPresenter editor, IBrush indicatorFG) {
|
||||
_editor = editor;
|
||||
_indicatorFG = indicatorFG;
|
||||
|
||||
var font = App.Current.FindResource("JetBrainsMonoItalic") as FontFamily;
|
||||
_indicatorTypeface = new Typeface(font, FontStyle.Italic, FontWeight.Regular);
|
||||
_indicatorTypeface = new Typeface("fonts:SourceGit#JetBrains Mono", FontStyle.Italic);
|
||||
}
|
||||
|
||||
protected override void ColorizeLine(DocumentLine line) {
|
||||
|
@ -214,7 +212,6 @@ namespace SourceGit.Views {
|
|||
|
||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
||||
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
||||
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
||||
|
||||
|
@ -226,6 +223,9 @@ namespace SourceGit.Views {
|
|||
|
||||
_textMate = this.InstallTextMate(_registryOptions);
|
||||
UpdateGrammar();
|
||||
|
||||
// This line must after InstallTextMate.
|
||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||
}
|
||||
|
||||
protected override void OnUnloaded(RoutedEventArgs e) {
|
||||
|
@ -432,9 +432,7 @@ namespace SourceGit.Views {
|
|||
public LineStyleTransformer(SingleSideTextDiffPresenter editor, IBrush indicatorFG) {
|
||||
_editor = editor;
|
||||
_indicatorFG = indicatorFG;
|
||||
|
||||
var font = App.Current.FindResource("JetBrainsMonoItalic") as FontFamily;
|
||||
_indicatorTypeface = new Typeface(font, FontStyle.Italic, FontWeight.Regular);
|
||||
_indicatorTypeface = new Typeface("fonts:SourceGit#JetBrains Mono", FontStyle.Italic);
|
||||
}
|
||||
|
||||
protected override void ColorizeLine(DocumentLine line) {
|
||||
|
@ -514,7 +512,6 @@ namespace SourceGit.Views {
|
|||
TextArea.LeftMargins.Add(new VerticalSeperatorMargin(this));
|
||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
||||
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
||||
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
||||
|
||||
|
@ -526,6 +523,9 @@ namespace SourceGit.Views {
|
|||
|
||||
_textMate = this.InstallTextMate(_registryOptions);
|
||||
UpdateGrammar();
|
||||
|
||||
// This line must after InstallTextMate
|
||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||
}
|
||||
|
||||
protected override void OnUnloaded(RoutedEventArgs e) {
|
||||
|
|
|
@ -133,13 +133,13 @@
|
|||
HorizontalAlignment="Left"
|
||||
IsVisible="{Binding !IsRepository}"/>
|
||||
|
||||
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" VerticalAlignment="Center" Text="{Binding Name}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Classes="monospace"
|
||||
Margin="8,0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Text="{Binding Id}"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
IsVisible="{Binding IsRepository}"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -114,7 +114,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding}"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -157,8 +157,8 @@
|
|||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||
<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" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
|
||||
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding Backend}" IsVisible="{Binding !IsFolder}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -211,7 +211,7 @@
|
|||
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path}" Margin="4,0,0,0" FontSize="12" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -239,7 +239,7 @@
|
|||
<DataGridTemplateColumn Header="ICON">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}" IconFontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<v:ChangeStatusIcon Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding}"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureFileName}}" Margin="4,0,0,0" FontSize="12"/>
|
||||
</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" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Classes="monospace" Text="{Binding Path, Converter={x:Static c:PathConverters.PureDirectoryName}}" Margin="4,0,0,0" FontSize="12" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -282,8 +282,8 @@
|
|||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||
<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" FontFamily="{StaticResource JetBrainsMono}" Margin="6,0,0,0"/>
|
||||
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" IsVisible="{Binding !IsFolder}"/>
|
||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||
</Grid>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
|
|
Loading…
Reference in a new issue