Repository navigation
Expand file tree
/
Copy pathDiffReviewDialog.xaml
More file actions
81 lines (77 loc) · 4.48 KB
/
Copy pathDiffReviewDialog.xaml
File metadata and controls
81 lines (77 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<ContentDialog
x:Class="CodingSahayi.DiffReviewDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CodingSahayi"
Title="Review Changes"
MinWidth="900"
MaxWidth="1000"
MaxHeight="750"
DefaultButton="Primary"
PrimaryButtonText="Accept & Apply Patch"
CloseButtonText="Reject / Cancel">
<Grid Padding="0,8,0,0" RowSpacing="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Header: file name, icon, full-path tooltip -->
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
<FontIcon Glyph="" FontSize="18" Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" />
<TextBlock x:Name="FileNameText" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center"
ToolTipService.ToolTip="" />
<Border Background="#1F2A38" CornerRadius="4" Padding="8,4">
<TextBlock x:Name="HeaderStatsText" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" />
</Border>
</StackPanel>
<!-- View-mode toggle + legend -->
<StackPanel Grid.Row="1" Orientation="Horizontal" Spacing="16" VerticalAlignment="Center">
<RadioButtons x:Name="ViewModeToggle" Header="View" SelectedIndex="0" MaxColumns="2">
<x:String>Unified (Inline)</x:String>
<x:String>Split (Side-by-Side)</x:String>
</RadioButtons>
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
<Border Background="#1F3D2A" CornerRadius="3" Padding="6,2">
<TextBlock Text="+ added" Foreground="#7DC87D" FontSize="11" />
</Border>
<Border Background="#3D1F24" CornerRadius="3" Padding="6,2">
<TextBlock Text="- deleted" Foreground="#E07A7A" FontSize="11" />
</Border>
<Border Background="Transparent" BorderBrush="#2A3441" BorderThickness="1" CornerRadius="3" Padding="6,2">
<TextBlock Text="context" Foreground="#91A3B0" FontSize="11" />
</Border>
</StackPanel>
</StackPanel>
<!-- Body: unified/side-by-side diff -->
<ScrollViewer x:Name="DiffScrollViewer" Grid.Row="2"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto">
<ItemsControl x:Name="DiffListView" FontFamily="Cascadia Code, Consolas" FontSize="12">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="local:DiffLineViewModel">
<Grid Height="20" Background="{x:Bind BackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition Width="48" />
<ColumnDefinition Width="22" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{x:Bind OldLineNo}" TextAlignment="Right"
Foreground="#5A6B7A" FontFamily="Cascadia Code, Consolas" FontSize="11" />
<TextBlock Grid.Column="1" Text="{x:Bind NewLineNo}" TextAlignment="Right"
Foreground="#5A6B7A" FontFamily="Cascadia Code, Consolas" FontSize="11" />
<TextBlock Grid.Column="2" Text="{x:Bind Marker}" Foreground="{x:Bind MarkerBrush}"
FontFamily="Cascadia Code, Consolas" FontSize="12" FontWeight="Bold"
HorizontalAlignment="Center" />
<TextBlock Grid.Column="3" Text="{x:Bind LineText}"
FontFamily="Cascadia Code, Consolas" FontSize="12"
Foreground="#D9E1E8" TextWrapping="NoWrap"
IsTextSelectionEnabled="True" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</ContentDialog>