mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
ux: remove unnecessary controls
This commit is contained in:
parent
29ce95e81e
commit
efa02d9e96
7 changed files with 48 additions and 44 deletions
|
@ -384,6 +384,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_changes = null;
|
||||
FullMessage = string.Empty;
|
||||
Changes = [];
|
||||
VisibleChanges = null;
|
||||
SelectedChanges = null;
|
||||
ViewRevisionFileContent = null;
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.CommitDetail"
|
||||
x:DataType="vm:CommitDetail"
|
||||
Background="{DynamicResource Brush.Window}">
|
||||
x:DataType="vm:CommitDetail">
|
||||
<TabControl SelectedIndex="{Binding ActivePageIndex, Mode=TwoWay}" Padding="4">
|
||||
<!-- Information Page -->
|
||||
<TabItem>
|
||||
|
|
|
@ -120,22 +120,26 @@
|
|||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Background="Transparent"/>
|
||||
|
||||
<Grid Grid.Row="2" Margin="0,0,4,4">
|
||||
<Border Background="{DynamicResource Brush.Window}">
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
</Border>
|
||||
|
||||
<ContentControl Content="{Binding DetailContext}">
|
||||
<Border Grid.Row="2" Margin="0,0,4,4">
|
||||
<ContentControl>
|
||||
<ContentControl.Content>
|
||||
<Binding Path="DetailContext">
|
||||
<Binding.TargetNullValue>
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
</Binding.TargetNullValue>
|
||||
</Binding>
|
||||
</ContentControl.Content>
|
||||
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:CommitDetail">
|
||||
<v:CommitDetail/>
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -174,15 +174,19 @@
|
|||
Background="{DynamicResource Brush.Window}"
|
||||
BorderBrush="{DynamicResource Brush.Border0}"/>
|
||||
|
||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
|
||||
<Border Background="{DynamicResource Brush.Window}">
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
</Border>
|
||||
|
||||
<ContentControl Content="{Binding DetailContext}">
|
||||
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
|
||||
<ContentControl>
|
||||
<ContentControl.Content>
|
||||
<Binding Path="DetailContext">
|
||||
<Binding.TargetNullValue>
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
</Binding.TargetNullValue>
|
||||
</Binding>
|
||||
</ContentControl.Content>
|
||||
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:CommitDetail">
|
||||
<v:CommitDetail/>
|
||||
|
@ -193,23 +197,21 @@
|
|||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="x:Int32">
|
||||
<Grid Background="{DynamicResource Brush.Window}">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Center"
|
||||
Margin="0,16"
|
||||
FontSize="24" FontWeight="Bold"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Histories.Selected'}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TextBlock HorizontalAlignment="Center"
|
||||
Margin="0,16"
|
||||
FontSize="24" FontWeight="Bold"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Histories.Selected'}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</v:LayoutableGrid>
|
||||
</UserControl>
|
||||
|
|
|
@ -260,15 +260,14 @@
|
|||
BorderThickness="0,1,0,0"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"/>
|
||||
|
||||
<Border Grid.Row="2" Background="{DynamicResource Brush.Window}">
|
||||
<Grid Grid.Row="2">
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="2" IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<ContentControl Content="{Binding DetailContext}">
|
||||
Fill="{DynamicResource Brush.FG2}"
|
||||
IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
|
||||
<ContentControl Content="{Binding DetailContext}" IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:CommitDetail">
|
||||
<v:CommitDetail/>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</Border>
|
||||
|
||||
<!-- Body -->
|
||||
<Border Grid.Row="1" Background="{DynamicResource Brush.Window}">
|
||||
<Border Grid.Row="1">
|
||||
<ContentControl Content="{Binding Data}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:Welcome">
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.RevisionCompare"
|
||||
x:DataType="vm:RevisionCompare"
|
||||
Background="{DynamicResource Brush.Window}">
|
||||
x:DataType="vm:RevisionCompare">
|
||||
<UserControl.DataTemplates>
|
||||
<DataTemplate DataType="m:Null">
|
||||
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Background="{DynamicResource Brush.Accent}" CornerRadius="4">
|
||||
|
|
Loading…
Reference in a new issue