mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
feature: stage/unstage hunk (#265)
This commit is contained in:
parent
b9ed0987eb
commit
b7e0e38de3
18 changed files with 688 additions and 120 deletions
|
@ -57,13 +57,13 @@ namespace SourceGit.Views
|
|||
|
||||
private static readonly string[] INDICATOR = ["?", "±", "+", "−", "➜", "❏", "U", "★"];
|
||||
|
||||
public static readonly StyledProperty<bool> IsWorkingCopyChangeProperty =
|
||||
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsWorkingCopyChange));
|
||||
public static readonly StyledProperty<bool> IsUnstagedChangeProperty =
|
||||
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsUnstagedChange));
|
||||
|
||||
public bool IsWorkingCopyChange
|
||||
public bool IsUnstagedChange
|
||||
{
|
||||
get => GetValue(IsWorkingCopyChangeProperty);
|
||||
set => SetValue(IsWorkingCopyChangeProperty, value);
|
||||
get => GetValue(IsUnstagedChangeProperty);
|
||||
set => SetValue(IsUnstagedChangeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<Models.Change> ChangeProperty =
|
||||
|
@ -77,7 +77,7 @@ namespace SourceGit.Views
|
|||
|
||||
static ChangeStatusIcon()
|
||||
{
|
||||
AffectsRender<ChangeStatusIcon>(IsWorkingCopyChangeProperty, ChangeProperty);
|
||||
AffectsRender<ChangeStatusIcon>(IsUnstagedChangeProperty, ChangeProperty);
|
||||
}
|
||||
|
||||
public override void Render(DrawingContext context)
|
||||
|
@ -89,7 +89,7 @@ namespace SourceGit.Views
|
|||
|
||||
IBrush background;
|
||||
string indicator;
|
||||
if (IsWorkingCopyChange)
|
||||
if (IsUnstagedChange)
|
||||
{
|
||||
if (Change.IsConflit)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue