diff --git a/src/Commands/QueryLocalChanges.cs b/src/Commands/QueryLocalChanges.cs index a9f777b1..d58f42f4 100644 --- a/src/Commands/QueryLocalChanges.cs +++ b/src/Commands/QueryLocalChanges.cs @@ -39,6 +39,9 @@ namespace SourceGit.Commands case " M": change.Set(Models.ChangeState.None, Models.ChangeState.Modified); break; + case " T": + change.Set(Models.ChangeState.None, Models.ChangeState.TypeChanged); + break; case " A": change.Set(Models.ChangeState.None, Models.ChangeState.Added); break; @@ -57,15 +60,33 @@ namespace SourceGit.Commands case "MM": change.Set(Models.ChangeState.Modified, Models.ChangeState.Modified); break; + case "MT": + change.Set(Models.ChangeState.Modified, Models.ChangeState.TypeChanged); + break; case "MD": change.Set(Models.ChangeState.Modified, Models.ChangeState.Deleted); break; + case "T": + change.Set(Models.ChangeState.TypeChanged); + break; + case "TM": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Modified); + break; + case "TT": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.TypeChanged); + break; + case "TD": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Deleted); + break; case "A": change.Set(Models.ChangeState.Added); break; case "AM": change.Set(Models.ChangeState.Added, Models.ChangeState.Modified); break; + case "AT": + change.Set(Models.ChangeState.Added, Models.ChangeState.TypeChanged); + break; case "AD": change.Set(Models.ChangeState.Added, Models.ChangeState.Deleted); break; @@ -78,6 +99,9 @@ namespace SourceGit.Commands case "RM": change.Set(Models.ChangeState.Renamed, Models.ChangeState.Modified); break; + case "RT": + change.Set(Models.ChangeState.Renamed, Models.ChangeState.TypeChanged); + break; case "RD": change.Set(Models.ChangeState.Renamed, Models.ChangeState.Deleted); break; @@ -87,6 +111,9 @@ namespace SourceGit.Commands case "CM": change.Set(Models.ChangeState.Copied, Models.ChangeState.Modified); break; + case "CT": + change.Set(Models.ChangeState.Copied, Models.ChangeState.TypeChanged); + break; case "CD": change.Set(Models.ChangeState.Copied, Models.ChangeState.Deleted); break; diff --git a/src/Models/Change.cs b/src/Models/Change.cs index 5350c169..07ce4e2b 100644 --- a/src/Models/Change.cs +++ b/src/Models/Change.cs @@ -13,6 +13,7 @@ namespace SourceGit.Models { None, Modified, + TypeChanged, Added, Deleted, Renamed, diff --git a/src/Views/ChangeStatusIcon.cs b/src/Views/ChangeStatusIcon.cs index e54b765e..06508638 100644 --- a/src/Views/ChangeStatusIcon.cs +++ b/src/Views/ChangeStatusIcon.cs @@ -18,6 +18,12 @@ namespace SourceGit.Views EndPoint = new RelativePoint(0, 1, RelativeUnit.Relative), }, new LinearGradientBrush + { + GradientStops = new GradientStops() { new GradientStop(Color.FromRgb(238, 160, 14), 0), new GradientStop(Color.FromRgb(228, 172, 67), 1) }, + StartPoint = new RelativePoint(0, 0, RelativeUnit.Relative), + EndPoint = new RelativePoint(0, 1, RelativeUnit.Relative), + }, + new LinearGradientBrush { GradientStops = new GradientStops() { new GradientStop(Color.FromRgb(47, 185, 47), 0), new GradientStop(Color.FromRgb(75, 189, 75), 1) }, StartPoint = new RelativePoint(0, 0, RelativeUnit.Relative), @@ -55,7 +61,7 @@ namespace SourceGit.Views }, ]; - private static readonly string[] INDICATOR = ["?", "±", "+", "−", "➜", "❏", "U", "★"]; + private static readonly string[] INDICATOR = ["?", "±", "T", "+", "−", "➜", "❏", "U", "★"]; public static readonly StyledProperty IsUnstagedChangeProperty = AvaloniaProperty.Register(nameof(IsUnstagedChange));