mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00

Added 2 new buttons (only visible in block-nav mode), with new icons and new (en_US) strings (First/Last Difference). Implemented these new buttons, and disabled the automatic wrap-around for the prev/next buttons in block-nav mode.
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.VisualTree;
|
|
|
|
namespace SourceGit.Views
|
|
{
|
|
public partial class DiffView : UserControl
|
|
{
|
|
public DiffView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnGotoFirstChange(object _, RoutedEventArgs e)
|
|
{
|
|
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
|
textDiff?.GotoFirstChange();
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnGotoPrevChange(object _, RoutedEventArgs e)
|
|
{
|
|
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
|
textDiff?.GotoPrevChange();
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnGotoNextChange(object _, RoutedEventArgs e)
|
|
{
|
|
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
|
textDiff?.GotoNextChange();
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnGotoLastChange(object _, RoutedEventArgs e)
|
|
{
|
|
var textDiff = this.FindDescendantOfType<TextDiffView>();
|
|
textDiff?.GotoLastChange();
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
}
|