Browse Source
fix(ScrollBar): use large scroll events for ScrollToHome and ScrollToEnd (#21748 )
* fix(ScrollBar): use large scroll events for ScrollToHome and ScrollToEnd
* Fix failing test
---------
Co-authored-by: Tim <47110241+timunie@users.noreply.github.com>
pull/21812/head
yoyo
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
4 deletions
src/Avalonia.Controls/Primitives/ScrollBar.cs
tests/Avalonia.Controls.UnitTests/Primitives/ScrollBarTests.cs
@ -579,7 +579,7 @@ namespace Avalonia.Controls.Primitives
public void ScrollToHome ( )
{
SetCurrentValue ( ValueProperty , Minimum ) ;
OnScroll ( ScrollEventType . Small Decrement) ;
OnScroll ( ScrollEventType . Large Decrement) ;
}
/// <summary>
@ -588,7 +588,7 @@ namespace Avalonia.Controls.Primitives
public void ScrollToEnd ( )
{
SetCurrentValue ( ValueProperty , Maximum ) ;
OnScroll ( ScrollEventType . Small Increment) ;
OnScroll ( ScrollEventType . Large Increment) ;
}
/// <summary>
@ -338,8 +338,8 @@ namespace Avalonia.Controls.UnitTests.Primitives
{
ScrollEventType . SmallIncrement ,
ScrollEventType . LargeIncrement ,
ScrollEventType . Small Decrement,
ScrollEventType . Small Increment,
ScrollEventType . Large Decrement,
ScrollEventType . Large Increment,
} ,
events ) ;
}