mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 05:10:25 +08:00
ux: makes BranchSelector looks like normal ComboBox
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
InheritsTransform="True">
|
||||
<Border Background="{DynamicResource Brush.Contents}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border1}"
|
||||
BorderBrush="{DynamicResource Brush.Accent}"
|
||||
CornerRadius="4"
|
||||
Padding="4"
|
||||
HorizontalAlignment="Stretch">
|
||||
|
||||
@@ -39,15 +39,6 @@ namespace SourceGit.Views
|
||||
set => SetValue(SelectedBranchProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<bool> UseFriendlyNameProperty =
|
||||
AvaloniaProperty.Register<BranchSelector, bool>(nameof(UseFriendlyName));
|
||||
|
||||
public bool UseFriendlyName
|
||||
{
|
||||
get => GetValue(UseFriendlyNameProperty);
|
||||
set => SetValue(UseFriendlyNameProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<bool> IsDropDownOpenedProperty =
|
||||
AvaloniaProperty.Register<BranchSelector, bool>(nameof(IsDropDownOpened));
|
||||
|
||||
@@ -93,6 +84,7 @@ namespace SourceGit.Views
|
||||
var visible = new List<Models.Branch>();
|
||||
var oldSelection = SelectedBranch;
|
||||
var keepSelection = false;
|
||||
|
||||
foreach (var b in Branches)
|
||||
{
|
||||
if (b.FriendlyName.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
Reference in New Issue
Block a user