2024-02-05 23:08:37 -08:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:m="using:SourceGit.Models"
|
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
2024-03-04 05:23:17 -08:00
|
|
|
x:Class="SourceGit.Views.TextDiffView"
|
|
|
|
Background="{DynamicResource Brush.Contents}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<UserControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="m:TextDiff">
|
|
|
|
<v:CombinedTextDiffPresenter HorizontalScrollBarVisibility="Auto"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
BorderThickness="0"
|
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
|
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
2024-03-04 23:53:38 -08:00
|
|
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
2024-02-05 23:08:37 -08:00
|
|
|
FontSize="12"
|
2024-02-28 19:29:54 -08:00
|
|
|
DiffData="{Binding}"
|
2024-03-20 05:17:20 -07:00
|
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
|
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:TwoSideTextDiff">
|
|
|
|
<Grid ColumnDefinitions="*,1,*">
|
|
|
|
<v:SingleSideTextDiffPresenter Grid.Column="0"
|
2024-02-28 19:29:54 -08:00
|
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
2024-03-20 05:17:20 -07:00
|
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"
|
2024-02-05 23:08:37 -08:00
|
|
|
IsOld="True"
|
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
BorderThickness="0"
|
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
|
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
2024-03-04 23:53:38 -08:00
|
|
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
2024-02-05 23:08:37 -08:00
|
|
|
FontSize="12"
|
|
|
|
DiffData="{Binding}"/>
|
|
|
|
|
|
|
|
<Rectangle Grid.Column="1" Fill="{DynamicResource Brush.Border2}" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
|
|
|
|
|
|
|
|
<v:SingleSideTextDiffPresenter Grid.Column="2"
|
2024-02-28 19:29:54 -08:00
|
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
2024-03-20 05:17:20 -07:00
|
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"
|
2024-02-05 23:08:37 -08:00
|
|
|
IsOld="False"
|
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
BorderThickness="0"
|
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
|
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
2024-03-04 23:53:38 -08:00
|
|
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
2024-02-05 23:08:37 -08:00
|
|
|
FontSize="12"
|
|
|
|
DiffData="{Binding}"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</UserControl.DataTemplates>
|
|
|
|
</UserControl>
|