feature: close repository configuration dialog when user pressed Esc (#1269)

This commit is contained in:
Alen Šiljak 2025-05-03 15:18:24 +02:00 committed by GitHub
parent 4b2983b330
commit c529fab869
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,5 @@
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Platform.Storage; using Avalonia.Platform.Storage;
@ -33,5 +34,13 @@ namespace SourceGit.Views
e.Handled = true; e.Handled = true;
} }
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (!e.Handled && e.Key == Key.Escape)
Close();
}
} }
} }