mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
96d4150d26
* remove dotnet-tool.json because the project does not rely on any dotnet tools. * remove Directory.Build.props because the solution has only one project. * move src/SourceGit to src. It's not needed to put all sources into a subfolder of src since there's only one project.
58 lines
4 KiB
XML
58 lines
4 KiB
XML
<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"
|
|
x:Class="SourceGit.Views.TextDiffView"
|
|
Background="{DynamicResource Brush.Contents}">
|
|
<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}"
|
|
FontFamily="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"
|
|
DiffData="{Binding}"
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"/>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate DataType="vm:TwoSideTextDiff">
|
|
<Grid ColumnDefinitions="*,1,*">
|
|
<v:SingleSideTextDiffPresenter Grid.Column="0"
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"
|
|
IsOld="True"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
VerticalScrollBarVisibility="Auto"
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
BorderThickness="0"
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
|
FontFamily="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"
|
|
DiffData="{Binding}"/>
|
|
|
|
<Rectangle Grid.Column="1" Fill="{DynamicResource Brush.Border2}" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
|
|
|
|
<v:SingleSideTextDiffPresenter Grid.Column="2"
|
|
SyncScrollOffset="{Binding $parent[v:DiffView].DataContext.(vm:DiffContext).SyncScrollOffset, Mode=TwoWay}"
|
|
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}"
|
|
IsOld="False"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
VerticalScrollBarVisibility="Auto"
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
BorderThickness="0"
|
|
Foreground="{DynamicResource Brush.FG1}"
|
|
SecondaryFG="{DynamicResource Brush.FG2}"
|
|
FontFamily="{Binding Source={x:Static vm:Preference.Instance}, Path=MonospaceFont}"
|
|
DiffData="{Binding}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</UserControl.DataTemplates>
|
|
</UserControl>
|