mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 16:44:59 +00:00
feature: supports filter submodules (#443)
This commit is contained in:
parent
0e774ee035
commit
b1457fe39d
9 changed files with 60 additions and 29 deletions
|
@ -128,15 +128,15 @@
|
|||
</Border>
|
||||
</Border>
|
||||
|
||||
<!-- Filter Branches -->
|
||||
<!-- Filter Branches/Tags/Submodules -->
|
||||
<TextBox Grid.Row="1"
|
||||
Height="24"
|
||||
Margin="8,6,4,0"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
Watermark="{DynamicResource Text.Repository.SearchBranchTag}"
|
||||
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
|
||||
Watermark="{DynamicResource Text.Repository.Filter}"
|
||||
Text="{Binding Filter, Mode=TwoWay}"
|
||||
VerticalContentAlignment="Center">
|
||||
<TextBox.InnerLeftContent>
|
||||
<Path Width="14" Height="14"
|
||||
|
@ -149,8 +149,8 @@
|
|||
<Button Classes="icon_button"
|
||||
Width="16"
|
||||
Margin="0,0,6,0"
|
||||
Command="{Binding ClearSearchBranchFilter}"
|
||||
IsVisible="{Binding SearchBranchFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
Command="{Binding ClearFilter}"
|
||||
IsVisible="{Binding Filter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
HorizontalAlignment="Right">
|
||||
<Path Width="14" Height="14"
|
||||
Margin="0,1,0,0"
|
||||
|
@ -253,7 +253,7 @@
|
|||
Height="0"
|
||||
Margin="8,0,4,0"
|
||||
Classes="repo_left_content_list"
|
||||
ItemsSource="{Binding Submodules}"
|
||||
ItemsSource="{Binding VisibleSubmodules}"
|
||||
SelectionMode="Single"
|
||||
ContextRequested="OnSubmoduleContextRequested"
|
||||
DoubleTapped="OnDoubleTappedSubmodule"
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace SourceGit.Views
|
|||
var remoteBranchRows = vm.IsRemoteGroupExpanded ? RemoteBranchTree.Rows.Count : 0;
|
||||
var desiredBranches = (localBranchRows + remoteBranchRows) * 24.0;
|
||||
var desiredTag = vm.IsTagGroupExpanded ? 24.0 * TagsList.Rows : 0;
|
||||
var desiredSubmodule = vm.IsSubmoduleGroupExpanded ? 24.0 * vm.Submodules.Count : 0;
|
||||
var desiredSubmodule = vm.IsSubmoduleGroupExpanded ? 24.0 * vm.VisibleSubmodules.Count : 0;
|
||||
var desiredWorktree = vm.IsWorktreeGroupExpanded ? 24.0 * vm.Worktrees.Count : 0;
|
||||
var desiredOthers = desiredTag + desiredSubmodule + desiredWorktree;
|
||||
var hasOverflow = (desiredBranches + desiredOthers > leftHeight);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue