mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57: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;
|
_changes = null;
|
||||||
FullMessage = string.Empty;
|
FullMessage = string.Empty;
|
||||||
|
Changes = [];
|
||||||
VisibleChanges = null;
|
VisibleChanges = null;
|
||||||
SelectedChanges = null;
|
SelectedChanges = null;
|
||||||
ViewRevisionFileContent = null;
|
ViewRevisionFileContent = null;
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
xmlns:c="using:SourceGit.Converters"
|
xmlns:c="using:SourceGit.Converters"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SourceGit.Views.CommitDetail"
|
x:Class="SourceGit.Views.CommitDetail"
|
||||||
x:DataType="vm:CommitDetail"
|
x:DataType="vm:CommitDetail">
|
||||||
Background="{DynamicResource Brush.Window}">
|
|
||||||
<TabControl SelectedIndex="{Binding ActivePageIndex, Mode=TwoWay}" Padding="4">
|
<TabControl SelectedIndex="{Binding ActivePageIndex, Mode=TwoWay}" Padding="4">
|
||||||
<!-- Information Page -->
|
<!-- Information Page -->
|
||||||
<TabItem>
|
<TabItem>
|
||||||
|
|
|
@ -120,22 +120,26 @@
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||||
Background="Transparent"/>
|
Background="Transparent"/>
|
||||||
|
|
||||||
<Grid Grid.Row="2" Margin="0,0,4,4">
|
<Border Grid.Row="2" Margin="0,0,4,4">
|
||||||
<Border Background="{DynamicResource Brush.Window}">
|
<ContentControl>
|
||||||
|
<ContentControl.Content>
|
||||||
|
<Binding Path="DetailContext">
|
||||||
|
<Binding.TargetNullValue>
|
||||||
<Path Width="128" Height="128"
|
<Path Width="128" Height="128"
|
||||||
Data="{StaticResource Icons.Detail}"
|
Data="{StaticResource Icons.Detail}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Fill="{DynamicResource Brush.FG2}"/>
|
Fill="{DynamicResource Brush.FG2}"/>
|
||||||
</Border>
|
</Binding.TargetNullValue>
|
||||||
|
</Binding>
|
||||||
|
</ContentControl.Content>
|
||||||
|
|
||||||
<ContentControl Content="{Binding DetailContext}">
|
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:CommitDetail">
|
<DataTemplate DataType="vm:CommitDetail">
|
||||||
<v:CommitDetail/>
|
<v:CommitDetail/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ContentControl.DataTemplates>
|
</ContentControl.DataTemplates>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
</Grid>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -174,15 +174,19 @@
|
||||||
Background="{DynamicResource Brush.Window}"
|
Background="{DynamicResource Brush.Window}"
|
||||||
BorderBrush="{DynamicResource Brush.Border0}"/>
|
BorderBrush="{DynamicResource Brush.Border0}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
|
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
|
||||||
<Border Background="{DynamicResource Brush.Window}">
|
<ContentControl>
|
||||||
|
<ContentControl.Content>
|
||||||
|
<Binding Path="DetailContext">
|
||||||
|
<Binding.TargetNullValue>
|
||||||
<Path Width="128" Height="128"
|
<Path Width="128" Height="128"
|
||||||
Data="{StaticResource Icons.Detail}"
|
Data="{StaticResource Icons.Detail}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Fill="{DynamicResource Brush.FG2}"/>
|
Fill="{DynamicResource Brush.FG2}"/>
|
||||||
</Border>
|
</Binding.TargetNullValue>
|
||||||
|
</Binding>
|
||||||
|
</ContentControl.Content>
|
||||||
|
|
||||||
<ContentControl Content="{Binding DetailContext}">
|
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:CommitDetail">
|
<DataTemplate DataType="vm:CommitDetail">
|
||||||
<v:CommitDetail/>
|
<v:CommitDetail/>
|
||||||
|
@ -193,7 +197,6 @@
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate DataType="x:Int32">
|
<DataTemplate DataType="x:Int32">
|
||||||
<Grid Background="{DynamicResource Brush.Window}">
|
|
||||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Path Width="128" Height="128"
|
<Path Width="128" Height="128"
|
||||||
Data="{StaticResource Icons.Detail}"
|
Data="{StaticResource Icons.Detail}"
|
||||||
|
@ -206,10 +209,9 @@
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Histories.Selected'}"/>
|
Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Histories.Selected'}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ContentControl.DataTemplates>
|
</ContentControl.DataTemplates>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
</Grid>
|
</Border>
|
||||||
</v:LayoutableGrid>
|
</v:LayoutableGrid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
@ -260,15 +260,14 @@
|
||||||
BorderThickness="0,1,0,0"
|
BorderThickness="0,1,0,0"
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"/>
|
BorderBrush="{DynamicResource Brush.Border2}"/>
|
||||||
|
|
||||||
<Border Grid.Row="2" Background="{DynamicResource Brush.Window}">
|
<Grid Grid.Row="2">
|
||||||
<Path Width="128" Height="128"
|
<Path Width="128" Height="128"
|
||||||
Data="{StaticResource Icons.Detail}"
|
Data="{StaticResource Icons.Detail}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Fill="{DynamicResource Brush.FG2}"/>
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
</Border>
|
IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="2" IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}">
|
<ContentControl Content="{Binding DetailContext}" IsVisible="{Binding SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||||
<ContentControl Content="{Binding DetailContext}">
|
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:CommitDetail">
|
<DataTemplate DataType="vm:CommitDetail">
|
||||||
<v:CommitDetail/>
|
<v:CommitDetail/>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
<Border Grid.Row="1" Background="{DynamicResource Brush.Window}">
|
<Border Grid.Row="1">
|
||||||
<ContentControl Content="{Binding Data}">
|
<ContentControl Content="{Binding Data}">
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:Welcome">
|
<DataTemplate DataType="vm:Welcome">
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
xmlns:c="using:SourceGit.Converters"
|
xmlns:c="using:SourceGit.Converters"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SourceGit.Views.RevisionCompare"
|
x:Class="SourceGit.Views.RevisionCompare"
|
||||||
x:DataType="vm:RevisionCompare"
|
x:DataType="vm:RevisionCompare">
|
||||||
Background="{DynamicResource Brush.Window}">
|
|
||||||
<UserControl.DataTemplates>
|
<UserControl.DataTemplates>
|
||||||
<DataTemplate DataType="m:Null">
|
<DataTemplate DataType="m:Null">
|
||||||
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Background="{DynamicResource Brush.Accent}" CornerRadius="4">
|
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Background="{DynamicResource Brush.Accent}" CornerRadius="4">
|
||||||
|
|
Loading…
Reference in a new issue