mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-29 08:04:59 +00:00
refactor: rewrite the histories filter function to supports both include
and exclude
modes (#690)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
e3ffe3ef6c
commit
ca5bc4b4df
27 changed files with 767 additions and 309 deletions
22
src/Converters/FilterModeConverters.cs
Normal file
22
src/Converters/FilterModeConverters.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Converters
|
||||
{
|
||||
public static class FilterModeConverters
|
||||
{
|
||||
public static readonly FuncValueConverter<Models.FilterMode, IBrush> ToBorderBrush =
|
||||
new FuncValueConverter<Models.FilterMode, IBrush>(v =>
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
case Models.FilterMode.Included:
|
||||
return Brushes.Green;
|
||||
case Models.FilterMode.Excluded:
|
||||
return Brushes.Red;
|
||||
default:
|
||||
return Brushes.Transparent;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue