mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00
feature: now image file previewer shows the image size and file size
This commit is contained in:
parent
7f87ce3431
commit
d6b21bad17
7 changed files with 388 additions and 331 deletions
|
@ -23,16 +23,25 @@
|
|||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:RevisionImageFile">
|
||||
<Border Margin="0,8" VerticalAlignment="Center" HorizontalAlignment="Center" Effect="drop-shadow(0 0 8 #A0000000)">
|
||||
<Border Background="{DynamicResource Brush.Window}">
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" Margin="8">
|
||||
<Grid>
|
||||
<v:ImageContainer/>
|
||||
<Image Source="{Binding Image}" Stretch="Uniform" VerticalAlignment="Center" RenderOptions.BitmapInterpolationMode="HighQuality"/>
|
||||
</Grid>
|
||||
<Grid RowDefinitions="*,Auto" Margin="0,8" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<Border Grid.Row="0" Effect="drop-shadow(0 0 8 #A0000000)">
|
||||
<Border Background="{DynamicResource Brush.Window}">
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" Margin="8">
|
||||
<v:ImageView Image="{Binding Image}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Border Height="16" Background="Green" CornerRadius="8" VerticalAlignment="Center">
|
||||
<TextBlock Classes="primary" Text="{Binding ImageType}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Classes="primary" Text="{Binding ImageSize}" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="primary" Text="{Binding FileSize}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||
<TextBlock Classes="primary" Text="{DynamicResource Text.Bytes}" Foreground="{DynamicResource Brush.FG2}" Margin="2,0,0,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="m:RevisionLFSObject">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue