|
13 | 13 | <Grid RowDefinitions="26,*"> |
14 | 14 | <!-- Toolbar --> |
15 | 15 | <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}"> |
16 | | - <Grid ColumnDefinitions="Auto,Auto,*,Auto"> |
| 16 | + <Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto"> |
17 | 17 | <!-- File Icon --> |
18 | 18 | <Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/> |
19 | 19 |
|
|
28 | 28 | ToolTip.Tip="{DynamicResource Text.Diff.FileModeChanged}"> |
29 | 29 | <TextBlock FontSize="10" HorizontalAlignment="Center" Margin="4,0" Text="{Binding FileModeChange}" Foreground="{DynamicResource Brush.BadgeFG}"/> |
30 | 30 | </Border> |
| 31 | + |
| 32 | + <!-- Line Changes Summary --> |
| 33 | + <ContentControl Grid.Column="2" Margin="4,0,0,0" Content="{Binding Content, Mode=OneWay}" IsVisible="{Binding IsTextDiff}"> |
| 34 | + <ContentControl.DataTemplates> |
| 35 | + <DataTemplate DataType="vm:TextDiffContext"> |
| 36 | + <StackPanel Orientation="Horizontal" Spacing="4"> |
| 37 | + <TextBlock FontSize="11" |
| 38 | + Foreground="Green" |
| 39 | + Text="{Binding Data.AddedLines, Mode=OneWay, StringFormat=+{0}}" |
| 40 | + IsVisible="{Binding Data.AddedLines, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/> |
| 41 | + <TextBlock FontSize="11" |
| 42 | + Foreground="Red" |
| 43 | + Text="{Binding Data.DeletedLines, Mode=OneWay, StringFormat=-{0}}" |
| 44 | + IsVisible="{Binding Data.DeletedLines, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/> |
| 45 | + </StackPanel> |
| 46 | + </DataTemplate> |
| 47 | + </ContentControl.DataTemplates> |
| 48 | + </ContentControl> |
31 | 49 |
|
32 | 50 | <!-- Title --> |
33 | | - <TextBlock Grid.Column="2" Margin="4,0,0,0" Text="{Binding Title}" ToolTip.Tip="{Binding Title}" FontSize="11" TextTrimming="CharacterEllipsis"/> |
| 51 | + <TextBlock Grid.Column="3" |
| 52 | + Margin="4,0,0,0" |
| 53 | + Text="{Binding Title}" |
| 54 | + ToolTip.Tip="{Binding Title}" |
| 55 | + FontSize="11" |
| 56 | + TextTrimming="CharacterEllipsis"/> |
34 | 57 |
|
35 | 58 | <!-- Toolbar Buttons --> |
36 | | - <StackPanel Grid.Column="3" Margin="8,0,0,0" Orientation="Horizontal" VerticalAlignment="Center"> |
| 59 | + <StackPanel Grid.Column="4" Margin="8,0,0,0" Orientation="Horizontal" VerticalAlignment="Center"> |
37 | 60 | <Button Classes="icon_button" |
38 | 61 | Width="28" |
39 | 62 | Click="OnGotoFirstChange" |
|
67 | 90 | <ContentControl Content="{Binding Content, Mode=OneWay}" IsVisible="{Binding IsTextDiff}"> |
68 | 91 | <ContentControl.DataTemplates> |
69 | 92 | <DataTemplate DataType="vm:TextDiffContext"> |
70 | | - <StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center"> |
71 | | - <TextBlock Margin="0,0,0,0" FontSize="11" Text="{Binding BlockNavigation.Indicator}"/> |
72 | | - <Border Height="16" |
73 | | - Background="{DynamicResource Brush.Diff.AddedBG}" |
74 | | - CornerRadius="8" |
75 | | - VerticalAlignment="Center" |
76 | | - IsVisible="{Binding AddedLines, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"> |
77 | | - <TextBlock FontSize="10" |
78 | | - Margin="8,0" |
79 | | - Foreground="{DynamicResource Brush.FG1}" |
80 | | - Text="{Binding AddedLines, StringFormat=+{0}}"/> |
81 | | - </Border> |
82 | | - <Border Height="16" |
83 | | - Background="{DynamicResource Brush.Diff.DeletedBG}" |
84 | | - CornerRadius="8" |
85 | | - VerticalAlignment="Center" |
86 | | - IsVisible="{Binding DeletedLines, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"> |
87 | | - <TextBlock FontSize="10" |
88 | | - Margin="8,0" |
89 | | - Foreground="{DynamicResource Brush.FG1}" |
90 | | - Text="{Binding DeletedLines, StringFormat=-{0}}"/> |
91 | | - </Border> |
92 | | - </StackPanel> |
| 93 | + <TextBlock Margin="0,0,0,0" FontSize="11" Text="{Binding BlockNavigation.Indicator}"/> |
93 | 94 | </DataTemplate> |
94 | 95 | </ContentControl.DataTemplates> |
95 | 96 | </ContentControl> |
|
0 commit comments