mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
feature: supports to search/filter tags (#215)
This commit is contained in:
parent
575f902a5d
commit
f8c4137c78
6 changed files with 50 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Avalonia;
|
||||
|
@ -279,6 +280,18 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnTagPropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.Property == DataGrid.ItemsSourceProperty && DataContext is ViewModels.Repository vm)
|
||||
{
|
||||
if (vm.VisibleTags == null)
|
||||
return;
|
||||
|
||||
var desiredHeight = tagsList.RowHeight * vm.VisibleTags.Count;
|
||||
tagsList.Height = Math.Min(200, desiredHeight);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnToggleFilter(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is ToggleButton toggle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue