|
176 | 176 |
|
177 | 177 | <!-- Image Diff --> |
178 | 178 | <DataTemplate DataType="m:ImageDiff"> |
179 | | - <Grid RowDefinitions="Auto,*,Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,8,8,0"> |
180 | | - <Grid Grid.Row="0" RowDefinitions="24,24" ColumnDefinitions="Auto,Auto,Auto,Auto"> |
181 | | - <Border Grid.Row="0" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center"> |
| 179 | + <Grid RowDefinitions="Auto,*" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,16,8,0"> |
| 180 | + <Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" HorizontalAlignment="Center"> |
| 181 | + <Border Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center"> |
182 | 182 | <TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/> |
183 | 183 | </Border> |
184 | 184 |
|
185 | | - <TextBlock Grid.Row="0" Grid.Column="1" Classes="monospace" Text="{Binding OldImageSize}" Margin="8,0,0,0"/> |
186 | | - <TextBlock Grid.Row="0" Grid.Column="2" Classes="monospace" Text="{Binding OldFileSize}" Foreground="{DynamicResource Brush.FG2}" Margin="16,0,0,0" HorizontalAlignment="Right"/> |
187 | | - <TextBlock Grid.Row="0" Grid.Column="3" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" Margin="2,0,0,0"/> |
| 185 | + <TextBlock Grid.Column="1" Classes="monospace" Text="{Binding OldImageSize}" Margin="8,0,0,0"/> |
| 186 | + <TextBlock Grid.Column="2" Classes="monospace" Text="{Binding OldFileSize}" Foreground="{DynamicResource Brush.FG2}" Margin="16,0,0,0" HorizontalAlignment="Right"/> |
| 187 | + <TextBlock Grid.Column="3" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" Margin="2,0,0,0"/> |
188 | 188 |
|
189 | | - <Border Grid.Row="1" Grid.Column="0" Height="16" Background="Green" CornerRadius="8" VerticalAlignment="Center"> |
| 189 | + <Border Grid.Column="4" Height="16" Background="Green" CornerRadius="8" VerticalAlignment="Center" Margin="32,0,0,0"> |
190 | 190 | <TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.New}" Margin="8,0" FontSize="10"/> |
191 | 191 | </Border> |
192 | 192 |
|
193 | | - <TextBlock Grid.Row="1" Grid.Column="1" Classes="monospace" Text="{Binding NewImageSize}" Margin="8,0,0,0"/> |
194 | | - <TextBlock Grid.Row="1" Grid.Column="2" Classes="monospace" Text="{Binding NewFileSize}" Foreground="{DynamicResource Brush.FG2}" Margin="16,0,0,0" HorizontalAlignment="Right"/> |
195 | | - <TextBlock Grid.Row="1" Grid.Column="3" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" Margin="2,0,0,0"/> |
| 193 | + <TextBlock Grid.Column="5" Classes="monospace" Text="{Binding NewImageSize}" Margin="8,0,0,0"/> |
| 194 | + <TextBlock Grid.Column="6" Classes="monospace" Text="{Binding NewFileSize}" Foreground="{DynamicResource Brush.FG2}" Margin="16,0,0,0" HorizontalAlignment="Right"/> |
| 195 | + <TextBlock Grid.Column="7" Classes="monospace" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" Margin="2,0,0,0"/> |
196 | 196 | </Grid> |
197 | 197 |
|
198 | | - <Border Grid.Row="1" Background="{DynamicResource Brush.Window}" Effect="drop-shadow(0 0 8 #A0000000)" Margin="0,8,0,0" HorizontalAlignment="Center"> |
199 | | - <Border BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" Margin="8"> |
200 | | - <v:ImageDiffView Alpha="{Binding #ImageDiffSlider.Value}" |
201 | | - OldImage="{Binding Old}" |
202 | | - NewImage="{Binding New}" |
203 | | - RenderOptions.BitmapInterpolationMode="HighQuality"/> |
| 198 | + <Grid Grid.Row="1" RowDefinitions="*,Auto,Auto" Margin="0,16,0,0" HorizontalAlignment="Center"> |
| 199 | + <Border Grid.Row="0" Background="{DynamicResource Brush.Window}" Effect="drop-shadow(0 0 8 #A0000000)"> |
| 200 | + <Border BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" Margin="8"> |
| 201 | + <v:ImageDiffView Alpha="{Binding #ImageDiffSlider.Value}" |
| 202 | + OldImage="{Binding Old}" |
| 203 | + NewImage="{Binding New}" |
| 204 | + RenderOptions.BitmapInterpolationMode="HighQuality"/> |
| 205 | + </Border> |
204 | 206 | </Border> |
205 | | - </Border> |
206 | | - |
207 | | - <Slider Grid.Row="2" |
208 | | - x:Name="ImageDiffSlider" |
209 | | - Minimum="0" Maximum="1" |
210 | | - VerticalAlignment="Top" |
211 | | - TickPlacement="None" |
212 | | - Margin="0,4,0,0" |
213 | | - MinHeight="0" |
214 | | - Foreground="{DynamicResource Brush.Border1}" |
215 | | - Value="0.5"> |
216 | | - <Slider.Resources> |
217 | | - <Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness> |
218 | | - <GridLength x:Key="SliderPreContentMargin">0</GridLength> |
219 | | - <GridLength x:Key="SliderPostContentMargin">0</GridLength> |
220 | | - <CornerRadius x:Key="SliderThumbCornerRadius">8</CornerRadius> |
221 | | - <x:Double x:Key="SliderHorizontalThumbWidth">16</x:Double> |
222 | | - <x:Double x:Key="SliderHorizontalThumbHeight">16</x:Double> |
223 | | - </Slider.Resources> |
224 | | - </Slider> |
| 207 | + |
| 208 | + <Grid Grid.Row="1" ColumnDefinitions="*,*" Margin="0,8,0,0"> |
| 209 | + <TextBlock Grid.Column="0" Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Foreground="{DynamicResource Brush.FG2}" FontSize="10"/> |
| 210 | + <TextBlock Grid.Column="1" Classes="monospace" Text="{DynamicResource Text.Diff.Binary.New}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="10"/> |
| 211 | + </Grid> |
| 212 | + |
| 213 | + <Slider Grid.Row="2" |
| 214 | + x:Name="ImageDiffSlider" |
| 215 | + Minimum="0" Maximum="1" |
| 216 | + VerticalAlignment="Top" |
| 217 | + TickPlacement="None" |
| 218 | + Margin="8,4,8,0" |
| 219 | + MinHeight="0" |
| 220 | + Foreground="{DynamicResource Brush.Border1}" |
| 221 | + Value="0.5"> |
| 222 | + <Slider.Resources> |
| 223 | + <Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness> |
| 224 | + <GridLength x:Key="SliderPreContentMargin">0</GridLength> |
| 225 | + <GridLength x:Key="SliderPostContentMargin">0</GridLength> |
| 226 | + <CornerRadius x:Key="SliderThumbCornerRadius">8</CornerRadius> |
| 227 | + <x:Double x:Key="SliderHorizontalThumbWidth">16</x:Double> |
| 228 | + <x:Double x:Key="SliderHorizontalThumbHeight">16</x:Double> |
| 229 | + </Slider.Resources> |
| 230 | + </Slider> |
| 231 | + </Grid> |
225 | 232 | </Grid> |
226 | 233 | </DataTemplate> |
227 | 234 |
|
|
0 commit comments