mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
ux: move left siderbar mode switcher top
This commit is contained in:
parent
24bf8811b8
commit
58be0b7dad
1 changed files with 96 additions and 97 deletions
|
@ -91,9 +91,37 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- Left Panel -->
|
<!-- Left Panel -->
|
||||||
<Grid Grid.Column="0" Classes="repository_leftpanel" RowDefinitions="Auto,Auto,*">
|
<Grid Grid.Column="0" Classes="repository_leftpanel" RowDefinitions="Auto,*">
|
||||||
|
<!-- Page Switcher for Left Contents (Dashboard or CommitSearch) -->
|
||||||
|
<Grid Grid.Row="0" Height="24" Margin="0,6" HorizontalAlignment="Center" ColumnDefinitions="48,1,48">
|
||||||
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||||
|
Height="24"
|
||||||
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
|
CornerRadius="12"/>
|
||||||
|
|
||||||
|
<RadioButton Grid.Column="0"
|
||||||
|
Classes="icon_button"
|
||||||
|
Width="48"
|
||||||
|
GroupName="SearchGroup"
|
||||||
|
IsChecked="{Binding !IsSearching, Mode=OneWay}">
|
||||||
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
|
||||||
|
</RadioButton>
|
||||||
|
|
||||||
|
<Rectangle Grid.Column="1" Width="0.65" HorizontalAlignment="Center" VerticalAlignment="Stretch" Fill="{DynamicResource Brush.Border2}"/>
|
||||||
|
|
||||||
|
<RadioButton Grid.Column="2"
|
||||||
|
Width="48"
|
||||||
|
Classes="icon_button"
|
||||||
|
GroupName="SearchGroup"
|
||||||
|
IsChecked="{Binding IsSearching, Mode=TwoWay}">
|
||||||
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
|
||||||
|
</RadioButton>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Dashboard -->
|
||||||
|
<Grid Grid.Row="1" Margin="0,0,0,8" RowDefinitions="Auto,Auto,28,Auto,28,*,28,Auto,28,Auto" IsVisible="{Binding !IsSearching}">
|
||||||
<!-- Page Switcher for Right Panel -->
|
<!-- Page Switcher for Right Panel -->
|
||||||
<Border Grid.Row="0" Margin="8,4,4,0" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" CornerRadius="6">
|
<Border Grid.Row="0" Margin="8,0,4,0" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" CornerRadius="6">
|
||||||
<Border CornerRadius="6" ClipToBounds="True">
|
<Border CornerRadius="6" ClipToBounds="True">
|
||||||
<ListBox Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
<ListBox Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
||||||
<ListBox.Styles>
|
<ListBox.Styles>
|
||||||
|
@ -171,42 +199,13 @@
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Page Switcher for Left Contents (Dashboard or CommitSearch) -->
|
|
||||||
<Grid Grid.Row="1" Height="24" Margin="0,6" HorizontalAlignment="Center" ColumnDefinitions="48,1,48">
|
|
||||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
||||||
Height="24"
|
|
||||||
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
|
||||||
CornerRadius="12"/>
|
|
||||||
|
|
||||||
<RadioButton Grid.Column="0"
|
|
||||||
Classes="icon_button"
|
|
||||||
Width="48"
|
|
||||||
GroupName="SearchGroup"
|
|
||||||
IsChecked="{Binding !IsSearching, Mode=OneWay}">
|
|
||||||
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
|
|
||||||
</RadioButton>
|
|
||||||
|
|
||||||
<Rectangle Grid.Column="1" Width="0.65" HorizontalAlignment="Center" VerticalAlignment="Stretch" Fill="{DynamicResource Brush.Border2}"/>
|
|
||||||
|
|
||||||
<RadioButton Grid.Column="2"
|
|
||||||
Width="48"
|
|
||||||
Classes="icon_button"
|
|
||||||
GroupName="SearchGroup"
|
|
||||||
IsChecked="{Binding IsSearching, Mode=TwoWay}">
|
|
||||||
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
|
|
||||||
</RadioButton>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Dashboard -->
|
|
||||||
<Grid Grid.Row="2" Margin="0,0,0,8" RowDefinitions="Auto,28,Auto,28,*,28,Auto,28,Auto" IsVisible="{Binding !IsSearching}">
|
|
||||||
<!-- Filter Branches -->
|
<!-- Filter Branches -->
|
||||||
<TextBox Grid.Row="0"
|
<TextBox Grid.Row="1"
|
||||||
Height="24"
|
Height="24"
|
||||||
Margin="8,0,4,4"
|
Margin="8,6,4,0"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
Background="Transparent"
|
|
||||||
Watermark="{DynamicResource Text.Repository.FilterBranchTip}"
|
Watermark="{DynamicResource Text.Repository.FilterBranchTip}"
|
||||||
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
|
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
|
||||||
VerticalContentAlignment="Center">
|
VerticalContentAlignment="Center">
|
||||||
|
@ -233,8 +232,8 @@
|
||||||
</TextBox>
|
</TextBox>
|
||||||
|
|
||||||
<!-- Local Branches -->
|
<!-- Local Branches -->
|
||||||
<TextBlock Grid.Row="1" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
<TextBlock Grid.Row="2" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
||||||
<TreeView Grid.Row="2"
|
<TreeView Grid.Row="3"
|
||||||
x:Name="localBranchTree"
|
x:Name="localBranchTree"
|
||||||
MaxHeight="400"
|
MaxHeight="400"
|
||||||
Margin="8,0,4,0"
|
Margin="8,0,4,0"
|
||||||
|
@ -302,13 +301,13 @@
|
||||||
</TreeView>
|
</TreeView>
|
||||||
|
|
||||||
<!-- Remotes -->
|
<!-- Remotes -->
|
||||||
<Grid Grid.Row="3" ColumnDefinitions="*,Auto">
|
<Grid Grid.Row="4" ColumnDefinitions="*,Auto">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/>
|
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/>
|
||||||
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding AddRemote}" ToolTip.Tip="{DynamicResource Text.Repository.Remotes.Add}">
|
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding AddRemote}" ToolTip.Tip="{DynamicResource Text.Repository.Remotes.Add}">
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Remote.Add}"/>
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Remote.Add}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TreeView Grid.Row="4"
|
<TreeView Grid.Row="5"
|
||||||
x:Name="remoteBranchTree"
|
x:Name="remoteBranchTree"
|
||||||
Margin="8,0,4,0"
|
Margin="8,0,4,0"
|
||||||
SelectionMode="Multiple"
|
SelectionMode="Multiple"
|
||||||
|
@ -365,7 +364,7 @@
|
||||||
</TreeView>
|
</TreeView>
|
||||||
|
|
||||||
<!-- Tags -->
|
<!-- Tags -->
|
||||||
<ToggleButton Grid.Row="5" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
<ToggleButton Grid.Row="6" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Tags}"/>
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Tags}"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
<TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||||
|
@ -374,7 +373,7 @@
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<DataGrid Grid.Row="6"
|
<DataGrid Grid.Row="7"
|
||||||
x:Name="tagsList"
|
x:Name="tagsList"
|
||||||
MaxHeight="200"
|
MaxHeight="200"
|
||||||
Margin="8,0,4,0"
|
Margin="8,0,4,0"
|
||||||
|
@ -453,7 +452,7 @@
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
<!-- Submodules -->
|
<!-- Submodules -->
|
||||||
<ToggleButton Grid.Row="7" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
<ToggleButton Grid.Row="8" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Submodules}"/>
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Submodules}"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
<TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||||
|
@ -476,7 +475,7 @@
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<DataGrid Grid.Row="8"
|
<DataGrid Grid.Row="9"
|
||||||
MaxHeight="200"
|
MaxHeight="200"
|
||||||
Margin="8,0,4,0"
|
Margin="8,0,4,0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
|
@ -535,7 +534,7 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Commit Search Panel -->
|
<!-- Commit Search Panel -->
|
||||||
<Grid Grid.Row="2" RowDefinitions="Auto,32,*" Margin="8,0,4,8" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
<Grid Grid.Row="1" RowDefinitions="Auto,32,*" Margin="8,0,4,8" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
||||||
<!-- Search Input Box -->
|
<!-- Search Input Box -->
|
||||||
<TextBox Grid.Row="0"
|
<TextBox Grid.Row="0"
|
||||||
x:Name="txtSearchCommitsBox"
|
x:Name="txtSearchCommitsBox"
|
||||||
|
|
Loading…
Reference in a new issue