mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
code_style: remove unused converters
This commit is contained in:
parent
e9fa9a42ca
commit
1d5331cf73
1 changed files with 0 additions and 46 deletions
|
@ -1,46 +0,0 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Converters
|
||||
{
|
||||
public static class DecoratorTypeConverters
|
||||
{
|
||||
public static readonly FuncValueConverter<Models.DecoratorType, IBrush> ToBackground =
|
||||
new FuncValueConverter<Models.DecoratorType, IBrush>(v =>
|
||||
{
|
||||
if (v == Models.DecoratorType.Tag)
|
||||
return Application.Current.FindResource("Brush.DecoratorTag") as IBrush;
|
||||
return Application.Current.FindResource("Brush.DecoratorBranch") as IBrush;
|
||||
});
|
||||
|
||||
public static readonly FuncValueConverter<Models.DecoratorType, StreamGeometry> ToIcon =
|
||||
new FuncValueConverter<Models.DecoratorType, StreamGeometry>(v =>
|
||||
{
|
||||
var key = "Icons.Tag";
|
||||
switch (v)
|
||||
{
|
||||
case Models.DecoratorType.CurrentBranchHead:
|
||||
key = "Icons.Check";
|
||||
break;
|
||||
case Models.DecoratorType.RemoteBranchHead:
|
||||
key = "Icons.Remote";
|
||||
break;
|
||||
case Models.DecoratorType.LocalBranchHead:
|
||||
key = "Icons.Branch";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return Application.Current?.FindResource(key) as StreamGeometry;
|
||||
});
|
||||
|
||||
public static readonly FuncValueConverter<Models.DecoratorType, FontWeight> ToFontWeight =
|
||||
new FuncValueConverter<Models.DecoratorType, FontWeight>(v =>
|
||||
v is Models.DecoratorType.CurrentBranchHead or Models.DecoratorType.CurrentCommitHead
|
||||
? FontWeight.Bold : FontWeight.Regular
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue