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>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="/Resources/Fonts.axaml"/>
|
|
||||||
<ResourceInclude Source="/Resources/Icons.axaml"/>
|
<ResourceInclude Source="/Resources/Icons.axaml"/>
|
||||||
<ResourceInclude Source="/Resources/Themes.axaml"/>
|
<ResourceInclude Source="/Resources/Themes.axaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Data.Core.Plugins;
|
using Avalonia.Data.Core.Plugins;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Media.Fonts;
|
||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -41,15 +42,23 @@ namespace SourceGit {
|
||||||
public static AppBuilder BuildAvaloniaApp() {
|
public static AppBuilder BuildAvaloniaApp() {
|
||||||
var builder = AppBuilder.Configure<App>();
|
var builder = AppBuilder.Configure<App>();
|
||||||
builder.UsePlatformDetect();
|
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()) {
|
if (OperatingSystem.IsWindows()) {
|
||||||
builder.With(new FontManagerOptions() {
|
builder.With(new FontManagerOptions() {
|
||||||
|
DefaultFamilyName = "Microsoft YaHei UI",
|
||||||
FontFallbacks = [
|
FontFallbacks = [
|
||||||
new FontFallback { FontFamily = new FontFamily("Microsoft YaHei UI") }
|
new FontFallback { FontFamily = new FontFamily("Microsoft YaHei UI") }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
} else if (OperatingSystem.IsMacOS()) {
|
} else if (OperatingSystem.IsMacOS()) {
|
||||||
builder.With(new FontManagerOptions() {
|
builder.With(new FontManagerOptions() {
|
||||||
|
DefaultFamilyName = "PingFang SC",
|
||||||
FontFallbacks = [
|
FontFallbacks = [
|
||||||
new FontFallback { FontFamily = new FontFamily("PingFang SC") }
|
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"/>
|
<Setter Property="FontStyle" Value="Italic"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TextBlock.monospace">
|
<Style Selector="TextBlock.monospace">
|
||||||
<Setter Property="FontFamily" Value="{StaticResource JetBrainsMono}"/>
|
<Setter Property="FontFamily" Value="fonts:SourceGit#JetBrains Mono"/>
|
||||||
</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}"/>
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TextBlock.group_header_label">
|
<Style Selector="TextBlock.group_header_label">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
|
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
|
||||||
|
@ -400,7 +394,7 @@
|
||||||
<Setter Property="Height" Value="26"/>
|
<Setter Property="Height" Value="26"/>
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}" />
|
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}" />
|
||||||
<Setter Property="TextElement.FontSize" Value="13"/>
|
<Setter Property="TextElement.FontSize" Value="12"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<Panel>
|
<Panel>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -17,14 +17,6 @@ namespace SourceGit.Views {
|
||||||
new GradientStops() { new GradientStop(Colors.Tomato, 0), new GradientStop(Color.FromRgb(252, 165, 150), 1) },
|
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 =
|
public static readonly StyledProperty<Models.User> UserProperty =
|
||||||
AvaloniaProperty.Register<Avatar, Models.User>(nameof(User));
|
AvaloniaProperty.Register<Avatar, Models.User>(nameof(User));
|
||||||
|
|
||||||
|
@ -34,7 +26,6 @@ namespace SourceGit.Views {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Avatar() {
|
static Avatar() {
|
||||||
AffectsRender<Avatar>(FallbackFontFamilyProperty);
|
|
||||||
UserProperty.Changed.AddClassHandler<Avatar>(OnUserPropertyChanged);
|
UserProperty.Changed.AddClassHandler<Avatar>(OnUserPropertyChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +97,7 @@ namespace SourceGit.Views {
|
||||||
EndPoint = new RelativePoint(0, 1, RelativeUnit.Relative),
|
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(
|
avatar._fallbackLabel = new FormattedText(
|
||||||
placeholder,
|
placeholder,
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="{DynamicResource Brush.Contents}"
|
Background="{DynamicResource Brush.Contents}"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
BlameData="{Binding Data}"/>
|
BlameData="{Binding Data}"/>
|
||||||
|
|
||||||
|
|
|
@ -63,22 +63,14 @@ namespace SourceGit.Views {
|
||||||
set => SetValue(ChangeProperty, value);
|
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() {
|
static ChangeStatusIcon() {
|
||||||
AffectsRender<ChangeStatusIcon>(IsWorkingCopyChangeProperty, ChangeProperty, IconFontFamilyProperty);
|
AffectsRender<ChangeStatusIcon>(IsWorkingCopyChangeProperty, ChangeProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Render(DrawingContext context) {
|
public override void Render(DrawingContext context) {
|
||||||
if (Change == null || Bounds.Width <= 0) return;
|
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;
|
IBrush background = null;
|
||||||
string indicator;
|
string indicator;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Target.Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,7 @@
|
||||||
<!-- Author & Committer -->
|
<!-- Author & Committer -->
|
||||||
<Grid ColumnDefinitions="96,*,96,*" Margin="0,8">
|
<Grid ColumnDefinitions="96,*,96,*" Margin="0,8">
|
||||||
<!-- Author -->
|
<!-- Author -->
|
||||||
<v:Avatar Grid.Column="0"
|
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Author}"/>
|
||||||
Width="64" Height="64"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
User="{Binding Author}"/>
|
|
||||||
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
|
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
|
||||||
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
|
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
||||||
|
@ -29,12 +25,7 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Committer -->
|
<!-- Committer -->
|
||||||
<v:Avatar Grid.Column="2"
|
<v:Avatar Grid.Column="2" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Committer}" IsVisible="{Binding IsCommitterVisible}"/>
|
||||||
Width="64" Height="64"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
User="{Binding Committer}"
|
|
||||||
IsVisible="{Binding IsCommitterVisible}"/>
|
|
||||||
<StackPanel Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical" 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}"/>
|
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Committer}"/>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,10,0,8">
|
||||||
|
@ -52,7 +43,7 @@
|
||||||
<Grid RowDefinitions="24,Auto,Auto,Auto" ColumnDefinitions="96,*">
|
<Grid RowDefinitions="24,Auto,Auto,Auto" ColumnDefinitions="96,*">
|
||||||
<!-- SHA -->
|
<!-- SHA -->
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.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 -->
|
<!-- 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}}"/>
|
<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>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
<TextBlock Classes="monospace"
|
||||||
|
Text="{Binding, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
Foreground="DarkOrange"
|
Foreground="DarkOrange"
|
||||||
TextDecorations="Underline"
|
TextDecorations="Underline"
|
||||||
Margin="0,0,16,0"
|
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}"/>
|
<Path Width="8" Height="8" Stretch="Fill" Data="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToIcon}}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
|
||||||
</Border>
|
</Border>
|
||||||
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
|
<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>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
@ -104,7 +95,7 @@
|
||||||
<!-- Messages -->
|
<!-- Messages -->
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" />
|
<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">
|
<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>
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
<DataGridTemplateColumn Header="FILE_NAME">
|
<DataGridTemplateColumn Header="FILE_NAME">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
<DataGridTemplateColumn Header="FOLDER_PATH">
|
<DataGridTemplateColumn Header="FOLDER_PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -144,8 +144,8 @@
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||||
<Grid Height="24" ColumnDefinitions="Auto,*">
|
<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" 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}"/>
|
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" 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"/>
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal" IsVisible="{Binding IsOrgFilePathVisible}" VerticalAlignment="Center">
|
<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"/>
|
<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="→"/>
|
<TextBlock Margin="8,0,0,0" Text="→"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
<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"/>
|
<Path 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}"/>
|
<TextBlock Classes="monospace" Margin="4,0,0,0" Text="{Binding FilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/>
|
||||||
<Path Grid.Column="2" Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{DynamicResource Icons.Loading}" IsVisible="{Binding IsLoading}"/>
|
<Path Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{DynamicResource Icons.Loading}" IsVisible="{Binding IsLoading}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" Margin="32,0,0,0" Orientation="Horizontal" IsVisible="{Binding IsTextDiff}" VerticalAlignment="Center">
|
<StackPanel Grid.Column="2" Margin="32,0,0,0" Orientation="Horizontal" IsVisible="{Binding IsTextDiff}" VerticalAlignment="Center">
|
||||||
|
@ -64,20 +64,20 @@
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
<Path Width="64" Height="64" Data="{StaticResource Icons.Binary}" Fill="{DynamicResource Brush.FG2}"/>
|
<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">
|
<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>
|
</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="1" Classes="monospace" 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="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">
|
<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>
|
</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="1" Classes="monospace" 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="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -91,20 +91,20 @@
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
<Path Width="64" Height="64" Data="{StaticResource Icons.LFS}" Fill="{DynamicResource Brush.FG2}"/>
|
<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">
|
<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>
|
</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="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" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
<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">
|
<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>
|
</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="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" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
<TextBlock Grid.Row="1" Grid.Column="2" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" FontSize="16"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -76,17 +76,13 @@
|
||||||
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto">
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto">
|
||||||
<v:Avatar Width="16" Height="16"
|
<v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/>
|
||||||
VerticalAlignment="Center"
|
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
||||||
IsHitTestVisible="False"
|
<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"/>
|
||||||
User="{Binding Author}"
|
<TextBlock Grid.Column="3" Classes="monospace" FontSize="12" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
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}"/>
|
|
||||||
</Grid>
|
</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>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</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}"/>
|
<Path Width="8" Height="8" Stretch="Fill" Data="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToIcon}}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
|
||||||
</Border>
|
</Border>
|
||||||
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
|
<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>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</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>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -73,7 +73,6 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
User="{Binding Author}"
|
User="{Binding Author}"
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
@ -82,9 +81,9 @@
|
||||||
<DataGridTemplateColumn MaxWidth="100" Header="AUTHOR">
|
<DataGridTemplateColumn MaxWidth="100" Header="AUTHOR">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
<DataTemplate x:DataType="{x:Type m:Commit}">
|
||||||
<TextBlock Text="{Binding Author.Name}"
|
<TextBlock Classes="monospace"
|
||||||
|
Text="{Binding Author.Name}"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -94,10 +93,10 @@
|
||||||
<DataGridTemplateColumn Header="SHA">
|
<DataGridTemplateColumn Header="SHA">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
<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"
|
FontSize="11"
|
||||||
Margin="12,0"
|
Margin="12,0"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
@ -106,10 +105,10 @@
|
||||||
<DataGridTemplateColumn Header="TIME">
|
<DataGridTemplateColumn Header="TIME">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate x:DataType="{x:Type m:Commit}">
|
<DataTemplate x:DataType="{x:Type m:Commit}">
|
||||||
<TextBlock Text="{Binding CommitterTimeStr}"
|
<TextBlock Classes="monospace"
|
||||||
|
Text="{Binding CommitterTimeStr}"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.ToCommitOpacity}}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
|
|
@ -52,16 +52,16 @@
|
||||||
Margin="0,0,0,8"/>
|
Margin="0,0,0,8"/>
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*">
|
<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="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="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="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}" />
|
<TextBlock Grid.Row="3" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
@ -72,19 +72,19 @@
|
||||||
Margin="0,8"/>
|
Margin="0,8"/>
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*">
|
<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="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="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="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="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}" />
|
<TextBlock Grid.Row="4" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Repo.StageOrUnstageSelected}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -159,18 +159,18 @@
|
||||||
IsVisible="{Binding !Node.IsRepository}"
|
IsVisible="{Binding !Node.IsRepository}"
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
|
Classes="monospace"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
Text="{Binding Node.Name}"
|
Text="{Binding Node.Name}"
|
||||||
IsVisible="{Binding Node.IsRepository}"
|
IsVisible="{Binding Node.IsRepository}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
|
Classes="monospace"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
Text="{DynamicResource Text.PageTabBar.Welcome.Title}"
|
Text="{DynamicResource Text.PageTabBar.Welcome.Title}"
|
||||||
IsVisible="{Binding !Node.IsRepository}"
|
IsVisible="{Binding !Node.IsRepository}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Classes="icon_button"
|
Classes="icon_button"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -405,11 +405,10 @@
|
||||||
<v:Avatar Width="16" Height="16"
|
<v:Avatar Width="16" Height="16"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
User="{Binding Author}"
|
User="{Binding Author}"/>
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
<TextBlock Grid.Column="1" FontSize="12" Classes="monospace" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="12" 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="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" Classes="monospace" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
<TextBlock Grid.Row="1" Text="{Binding Subject}" FontSize="12" VerticalAlignment="Bottom"/>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<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"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding Target.Subject}}" Margin="4,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,13 @@
|
||||||
<v:Avatar Width="16" Height="16"
|
<v:Avatar Width="16" Height="16"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
User="{Binding StartPoint.Author}"
|
User="{Binding StartPoint.Author}"/>
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding StartPoint.Author.Name}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding StartPoint.Author.Name}" FontFamily="{StaticResource JetBrainsMono}" 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="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" Classes="monospace" FontSize="12" Text="{Binding StartPoint.CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding StartPoint.CommitterTimeStr}" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
|
||||||
</Grid>
|
</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>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
@ -37,14 +36,13 @@
|
||||||
<v:Avatar Width="16" Height="16"
|
<v:Avatar Width="16" Height="16"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
User="{Binding EndPoint.Author}"
|
User="{Binding EndPoint.Author}"/>
|
||||||
FallbackFontFamily="{StaticResource JetBrainsMono}"/>
|
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding EndPoint.Author.Name}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding EndPoint.Author.Name}" FontFamily="{StaticResource JetBrainsMono}" 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="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" Classes="monospace" FontSize="12" Text="{Binding EndPoint.CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="3" FontSize="12" Text="{Binding EndPoint.CommitterTimeStr}" FontFamily="{StaticResource JetBrainsMono}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
|
||||||
</Grid>
|
</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>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -110,7 +108,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -118,7 +116,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -145,7 +143,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -153,7 +151,7 @@
|
||||||
<DataGridTemplateColumn Header="FILE_NAME">
|
<DataGridTemplateColumn Header="FILE_NAME">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -161,7 +159,7 @@
|
||||||
<DataGridTemplateColumn Header="FOLDER_PATH">
|
<DataGridTemplateColumn Header="FOLDER_PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -185,8 +183,8 @@
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||||
<Grid Height="24" ColumnDefinitions="Auto,*">
|
<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" 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}"/>
|
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" 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"/>
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<Grid Height="24" ColumnDefinitions="Auto,*">
|
<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" 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"/>
|
<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>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate DataType="m:RevisionTextFile">
|
<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>
|
||||||
|
|
||||||
<DataTemplate DataType="m:RevisionLFSObject">
|
<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}"/>
|
<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}"/>
|
<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">
|
<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}"/>
|
<TextBlock Text="{DynamicResource Text.Bytes}" Margin="8,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -65,11 +65,11 @@
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,*" >
|
<Grid RowDefinitions="Auto,*" >
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="*,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="0" Classes="monospace" FontSize="12" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" TextDecorations="Underline" Cursor="Hand"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="12" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0" FontFamily="{StaticResource JetBrainsMono}"/>
|
<TextBlock Grid.Column="1" Classes="monospace" FontSize="12" Text="{Binding TimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
</Grid>
|
</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>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
|
@ -148,7 +148,6 @@
|
||||||
<!-- Graph -->
|
<!-- Graph -->
|
||||||
<v:Chart Grid.Row="0" Grid.Column="1"
|
<v:Chart Grid.Row="0" Grid.Column="1"
|
||||||
Margin="16,8,0,0"
|
Margin="16,8,0,0"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
LineBrush="{DynamicResource Brush.FG1}"
|
LineBrush="{DynamicResource Brush.FG1}"
|
||||||
ShapeBrush="{DynamicResource Brush.Accent1}"
|
ShapeBrush="{DynamicResource Brush.Accent1}"
|
||||||
Samples="{Binding Samples}"/>
|
Samples="{Binding Samples}"/>
|
||||||
|
|
|
@ -9,14 +9,6 @@ using System.Globalization;
|
||||||
|
|
||||||
namespace SourceGit.Views {
|
namespace SourceGit.Views {
|
||||||
public class Chart : Control {
|
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 =
|
public static readonly StyledProperty<IBrush> LineBrushProperty =
|
||||||
AvaloniaProperty.Register<Chart, IBrush>(nameof(LineBrush), Brushes.Gray);
|
AvaloniaProperty.Register<Chart, IBrush>(nameof(LineBrush), Brushes.Gray);
|
||||||
|
|
||||||
|
@ -74,7 +66,7 @@ namespace SourceGit.Views {
|
||||||
maxV = (int)Math.Ceiling(maxV / 500.0) * 500;
|
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 pen = new Pen(LineBrush, 1);
|
||||||
var width = Bounds.Width;
|
var width = Bounds.Width;
|
||||||
var height = Bounds.Height;
|
var height = Bounds.Height;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
DiffData="{Binding}"
|
DiffData="{Binding}"
|
||||||
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"/>
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"/>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
DiffData="{Binding}"/>
|
DiffData="{Binding}"/>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
SecondaryFG="{DynamicResource Brush.FG2}"
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
DiffData="{Binding}"/>
|
DiffData="{Binding}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -138,9 +138,7 @@ namespace SourceGit.Views {
|
||||||
public LineStyleTransformer(CombinedTextDiffPresenter editor, IBrush indicatorFG) {
|
public LineStyleTransformer(CombinedTextDiffPresenter editor, IBrush indicatorFG) {
|
||||||
_editor = editor;
|
_editor = editor;
|
||||||
_indicatorFG = indicatorFG;
|
_indicatorFG = indicatorFG;
|
||||||
|
_indicatorTypeface = new Typeface("fonts:SourceGit#JetBrains Mono", FontStyle.Italic);
|
||||||
var font = App.Current.FindResource("JetBrainsMonoItalic") as FontFamily;
|
|
||||||
_indicatorTypeface = new Typeface(font, FontStyle.Italic, FontWeight.Regular);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ColorizeLine(DocumentLine line) {
|
protected override void ColorizeLine(DocumentLine line) {
|
||||||
|
@ -214,7 +212,6 @@ namespace SourceGit.Views {
|
||||||
|
|
||||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
TextArea.TextView.Margin = new Thickness(4, 0);
|
||||||
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
||||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
|
||||||
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
||||||
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
||||||
|
|
||||||
|
@ -226,6 +223,9 @@ namespace SourceGit.Views {
|
||||||
|
|
||||||
_textMate = this.InstallTextMate(_registryOptions);
|
_textMate = this.InstallTextMate(_registryOptions);
|
||||||
UpdateGrammar();
|
UpdateGrammar();
|
||||||
|
|
||||||
|
// This line must after InstallTextMate.
|
||||||
|
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnUnloaded(RoutedEventArgs e) {
|
protected override void OnUnloaded(RoutedEventArgs e) {
|
||||||
|
@ -432,9 +432,7 @@ namespace SourceGit.Views {
|
||||||
public LineStyleTransformer(SingleSideTextDiffPresenter editor, IBrush indicatorFG) {
|
public LineStyleTransformer(SingleSideTextDiffPresenter editor, IBrush indicatorFG) {
|
||||||
_editor = editor;
|
_editor = editor;
|
||||||
_indicatorFG = indicatorFG;
|
_indicatorFG = indicatorFG;
|
||||||
|
_indicatorTypeface = new Typeface("fonts:SourceGit#JetBrains Mono", FontStyle.Italic);
|
||||||
var font = App.Current.FindResource("JetBrainsMonoItalic") as FontFamily;
|
|
||||||
_indicatorTypeface = new Typeface(font, FontStyle.Italic, FontWeight.Regular);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ColorizeLine(DocumentLine line) {
|
protected override void ColorizeLine(DocumentLine line) {
|
||||||
|
@ -514,7 +512,6 @@ namespace SourceGit.Views {
|
||||||
TextArea.LeftMargins.Add(new VerticalSeperatorMargin(this));
|
TextArea.LeftMargins.Add(new VerticalSeperatorMargin(this));
|
||||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
TextArea.TextView.Margin = new Thickness(4, 0);
|
||||||
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
TextArea.TextView.BackgroundRenderers.Add(new LineBackgroundRenderer(this));
|
||||||
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
|
||||||
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
||||||
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
TextArea.TextView.ScrollOffsetChanged += OnTextViewScrollOffsetChanged;
|
||||||
|
|
||||||
|
@ -526,6 +523,9 @@ namespace SourceGit.Views {
|
||||||
|
|
||||||
_textMate = this.InstallTextMate(_registryOptions);
|
_textMate = this.InstallTextMate(_registryOptions);
|
||||||
UpdateGrammar();
|
UpdateGrammar();
|
||||||
|
|
||||||
|
// This line must after InstallTextMate
|
||||||
|
TextArea.TextView.LineTransformers.Add(new LineStyleTransformer(this, SecondaryFG));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnUnloaded(RoutedEventArgs e) {
|
protected override void OnUnloaded(RoutedEventArgs e) {
|
||||||
|
|
|
@ -133,13 +133,13 @@
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsVisible="{Binding !IsRepository}"/>
|
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"
|
<TextBlock Grid.Column="2"
|
||||||
|
Classes="monospace"
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
Text="{Binding Id}"
|
Text="{Binding Id}"
|
||||||
FontFamily="{StaticResource JetBrainsMono}"
|
|
||||||
IsVisible="{Binding IsRepository}"/>
|
IsVisible="{Binding IsRepository}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<DataGridTemplateColumn Header="FILE_NAME">
|
<DataGridTemplateColumn Header="FILE_NAME">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
<DataGridTemplateColumn Header="FOLDER_PATH">
|
<DataGridTemplateColumn Header="FOLDER_PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -157,8 +157,8 @@
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||||
<Grid Height="24" ColumnDefinitions="Auto,*">
|
<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" 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}"/>
|
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="True" Change="{Binding Backend}" 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"/>
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
<DataGridTemplateColumn Width="*" Header="PATH">
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
<DataGridTemplateColumn Header="FILE_NAME">
|
<DataGridTemplateColumn Header="FILE_NAME">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
<DataGridTemplateColumn Header="FOLDER_PATH">
|
<DataGridTemplateColumn Header="FOLDER_PATH">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<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>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
@ -282,8 +282,8 @@
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:FileTreeNode}">
|
||||||
<Grid Height="24" ColumnDefinitions="Auto,*">
|
<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" 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}"/>
|
<v:ChangeStatusIcon Grid.Column="0" Width="14" Height="14" IsWorkingCopyChange="False" Change="{Binding Backend}" 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"/>
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding FullPath, Converter={x:Static c:PathConverters.PureFileName}}" FontSize="12" Margin="6,0,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TreeDataTemplate>
|
</TreeDataTemplate>
|
||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
|
|
Loading…
Reference in a new issue