|
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"> |
17 | | - <StackPanel Grid.Column="0" Orientation="Horizontal" IsVisible="{Binding IsOrgFilePathVisible}" VerticalAlignment="Center"> |
18 | | - <Path Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/> |
19 | | - <TextBlock Classes="monospace" Margin="4,0,0,0" Text="{Binding OrgFilePath, Converter={x:Static c:PathConverters.TruncateIfTooLong}}" FontSize="11"/> |
20 | | - <TextBlock Margin="8,0,0,0" Text="→"/> |
21 | | - </StackPanel> |
22 | | - |
23 | | - <DockPanel Grid.Column="1" VerticalAlignment="Center"> |
24 | | - <Path DockPanel.Dock="Left" Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/> |
25 | | - <TextBlock Classes="monospace" Margin="4,0,0,0" Text="{Binding FilePath}" |
26 | | - TextTrimming="{Binding PathTrimming}" TextWrapping="NoWrap" HorizontalAlignment="Stretch" ToolTip.Tip="{Binding FilePath}" FontSize="11"/> |
27 | | - <Path DockPanel.Dock="Right" Classes="rotating" Width="10" Height="10" Margin="8,0" Data="{StaticResource Icons.Loading}" IsVisible="{Binding IsLoading}"/> |
28 | | - </DockPanel> |
29 | | - |
30 | | - <StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" IsVisible="{Binding FileModeDiff, Converter={x:Static ObjectConverters.IsNotNull}}"> |
31 | | - <TextBlock Classes="monospace" Margin="8,0,0,0" Text="{DynamicResource Text.Diff.FileModeChanged}" FontSize="11"/> |
32 | | - <TextBlock Classes="monospace" Text="{Binding FileModeDiff.Old}" FontSize="11"/> |
33 | | - <TextBlock Margin="4,0" Text="→"/> |
34 | | - <TextBlock Classes="monospace" Text="{Binding FileModeDiff.New}" FontSize="11"/> |
35 | | - </StackPanel> |
36 | | - |
37 | | - <StackPanel Grid.Column="3" Margin="32,0,0,0" Orientation="Horizontal" VerticalAlignment="Center"> |
| 16 | + <Grid ColumnDefinitions="Auto,Auto,*,Auto"> |
| 17 | + <!-- File Icon --> |
| 18 | + <Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.File}" Margin="8,0,0,0"/> |
| 19 | + |
| 20 | + <!-- File Mode Change --> |
| 21 | + <Border Grid.Column="1" |
| 22 | + Margin="4,0,0,0" |
| 23 | + Height="18" |
| 24 | + CornerRadius="4" |
| 25 | + VerticalAlignment="Center" |
| 26 | + Background="{DynamicResource Brush.Badge}" |
| 27 | + IsVisible="{Binding FileModeChange, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
| 28 | + ToolTip.Tip="{DynamicResource Text.Diff.FileModeChanged}"> |
| 29 | + <TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="4,0" Text="{Binding FileModeChange}"/> |
| 30 | + </Border> |
| 31 | + |
| 32 | + <!-- Title --> |
| 33 | + <TextBlock Grid.Column="2" Classes="monospace" Margin="4,0,0,0" Text="{Binding Title}" FontSize="11"/> |
| 34 | + |
| 35 | + <!-- Toolbar Buttons --> |
| 36 | + <StackPanel Grid.Column="3" Margin="8,0,0,0" Orientation="Horizontal" VerticalAlignment="Center"> |
38 | 37 | <ToggleButton Classes="line_path" |
39 | 38 | Width="32" Height="18" |
40 | 39 | Background="Transparent" |
41 | 40 | Padding="9,6" |
42 | 41 | IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting, Mode=TwoWay}" |
43 | | - IsVisible="{Binding IsTextDiff}" |
| 42 | + IsVisible="{Binding IsTextDiff}" |
44 | 43 | ToolTip.Tip="{DynamicResource Text.Diff.SyntaxHighlight}"> |
45 | 44 | <Path Width="13" Height="13" Data="{StaticResource Icons.SyntaxHighlight}" Margin="0,3,0,0"/> |
46 | 45 | </ToggleButton> |
|
50 | 49 | Background="Transparent" |
51 | 50 | Padding="9,6" |
52 | 51 | IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSideBySideDiff, Mode=TwoWay}" |
53 | | - IsVisible="{Binding IsTextDiff}" |
| 52 | + IsVisible="{Binding IsTextDiff}" |
54 | 53 | ToolTip.Tip="{DynamicResource Text.Diff.SideBySide}"> |
55 | 54 | <Path Width="12" Height="12" Data="{StaticResource Icons.LayoutHorizontal}" Margin="0,2,0,0"/> |
56 | 55 | </ToggleButton> |
57 | | - |
| 56 | + |
58 | 57 | <Button Classes="icon_button" Width="32" Command="{Binding OpenExternalMergeTool}" ToolTip.Tip="{DynamicResource Text.Diff.UseMerger}"> |
59 | 58 | <Path Width="12" Height="12" Stretch="Uniform" Data="{StaticResource Icons.OpenWith}"/> |
60 | 59 | </Button> |
|
135 | 134 |
|
136 | 135 | <TextBlock Grid.Column="4" Classes="monospace" Text="{Binding NewSize}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
137 | 136 | </Grid> |
138 | | - |
| 137 | + |
139 | 138 | <Border Grid.Row="1" Background="{DynamicResource Brush.Window}" Effect="drop-shadow(0 0 8 #A0000000)" Margin="0,8,0,0" HorizontalAlignment="Center"> |
140 | 139 | <Border BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" Margin="8"> |
141 | 140 | <v:ImageDiffView Alpha="{Binding #ImageDiffSlider.Value}" |
142 | 141 | OldImage="{Binding Old}" |
143 | 142 | NewImage="{Binding New}" |
144 | 143 | RenderOptions.BitmapInterpolationMode="HighQuality"/> |
145 | | - </Border> |
| 144 | + </Border> |
146 | 145 | </Border> |
147 | 146 |
|
148 | | - <Slider Grid.Row="2" |
149 | | - x:Name="ImageDiffSlider" |
| 147 | + <Slider Grid.Row="2" |
| 148 | + x:Name="ImageDiffSlider" |
150 | 149 | Minimum="0" Maximum="1" |
151 | 150 | VerticalAlignment="Top" |
152 | 151 | TickPlacement="None" |
|
0 commit comments