Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Views/ChangeStatusIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public class ChangeStatusIcon : Control
private static readonly string[] INDICATOR = ["?", "±", "T", "+", "−", "➜", "❏", "U", "★"];
private static readonly string[] TIPS = ["Unknown", "Modified", "Type Changed", "Added", "Deleted", "Renamed", "Copied", "Unmerged", "Untracked"];

private static readonly IBrush BACKGROUND_CONFLICT = Brushes.OrangeRed;
private const string INDICATOR_CONFLICT = "!";
private const string TIP_CONFLICT = "Conflict";

public static readonly StyledProperty<bool> IsUnstagedChangeProperty =
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsUnstagedChange));

Expand Down Expand Up @@ -95,8 +99,8 @@ public override void Render(DrawingContext context)
{
if (Change.IsConflict)
{
background = Brushes.OrangeRed;
indicator = "!";
background = BACKGROUND_CONFLICT;
indicator = INDICATOR_CONFLICT;
}
else
{
Expand Down Expand Up @@ -139,7 +143,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
}

if (isUnstaged)
ToolTip.SetTip(this, c.IsConflict ? "Conflict" : TIPS[(int)c.WorkTree]);
ToolTip.SetTip(this, c.IsConflict ? TIP_CONFLICT : TIPS[(int)c.WorkTree]);
else
ToolTip.SetTip(this, TIPS[(int)c.Index]);

Expand Down