ux: makes BranchSelector looks like normal ComboBox

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2026-03-31 14:21:59 +08:00
parent 4dd2847d35
commit 58e3130a40
2 changed files with 2 additions and 10 deletions

View File

@@ -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">

View File

@@ -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))