mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-17 00:14:59 +00:00
ux: new style for submodule diff
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
99b7208a54
commit
158d926189
1 changed files with 14 additions and 7 deletions
|
@ -261,7 +261,11 @@
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Orientation="Vertical" Margin="8,0">
|
<StackPanel Orientation="Vertical" Margin="8,0">
|
||||||
<Border IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNotNull}}">
|
<Border Height="16" HorizontalAlignment="Center" Background="Red" CornerRadius="8" IsVisible="{Binding New, Converter={x:Static ObjectConverters.IsNull}}">
|
||||||
|
<TextBlock Classes="primary" Text="{DynamicResource Text.Diff.Submodule.Deleted}" Margin="8,0" FontSize="10" Foreground="White"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Margin="0,8,0,0" IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
<ContentControl Content="{Binding Old}">
|
<ContentControl Content="{Binding Old}">
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="m:RevisionSubmodule">
|
<DataTemplate DataType="m:RevisionSubmodule">
|
||||||
|
@ -273,12 +277,19 @@
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<Path Width="16" Height="16" Data="{StaticResource Icons.DoubleDown}" HorizontalAlignment="Center">
|
||||||
|
<Path.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<Binding Path="Old" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
||||||
|
<Binding Path="New" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Path.IsVisible>
|
||||||
|
</Path>
|
||||||
|
|
||||||
<Border Height="16" HorizontalAlignment="Center" Background="Green" CornerRadius="8" IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNull}}">
|
<Border Height="16" HorizontalAlignment="Center" Background="Green" CornerRadius="8" IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNull}}">
|
||||||
<TextBlock Classes="primary" Text="{DynamicResource Text.Diff.Submodule.New}" Margin="8,0" FontSize="10" Foreground="White"/>
|
<TextBlock Classes="primary" Text="{DynamicResource Text.Diff.Submodule.New}" Margin="8,0" FontSize="10" Foreground="White"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Path Width="16" Height="16" Data="{StaticResource Icons.DoubleDown}" HorizontalAlignment="Center" IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
|
||||||
|
|
||||||
<Border Margin="0,8,0,0" BorderThickness="1" BorderBrush="Green" Background="{DynamicResource Brush.Window}" IsVisible="{Binding New, Converter={x:Static ObjectConverters.IsNotNull}}">
|
<Border Margin="0,8,0,0" BorderThickness="1" BorderBrush="Green" Background="{DynamicResource Brush.Window}" IsVisible="{Binding New, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
<ContentControl Content="{Binding New}">
|
<ContentControl Content="{Binding New}">
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
|
@ -288,10 +299,6 @@
|
||||||
</ContentControl.DataTemplates>
|
</ContentControl.DataTemplates>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border Margin="0,8,0,0" Height="16" HorizontalAlignment="Center" Background="Red" CornerRadius="8" IsVisible="{Binding New, Converter={x:Static ObjectConverters.IsNull}}">
|
|
||||||
<TextBlock Classes="primary" Text="{DynamicResource Text.Diff.Submodule.Deleted}" Margin="8,0" FontSize="10" Foreground="White"/>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue