feat: clean up warnings.
This commit is contained in:
@@ -29,7 +29,6 @@ public class ScrollTo
|
||||
private static void OnButtonThemeChanged(Control arg1, AvaloniaPropertyChangedEventArgs<ControlTheme?> arg2)
|
||||
{
|
||||
var button = EnsureButtonInAdorner(arg1);
|
||||
if (button is null) return;
|
||||
button.SetCurrentValue(StyledElement.ThemeProperty, arg2.NewValue.Value);
|
||||
}
|
||||
|
||||
@@ -37,11 +36,10 @@ public class ScrollTo
|
||||
{
|
||||
if (args.NewValue.Value is null) return;
|
||||
var button = EnsureButtonInAdorner(control);
|
||||
if (button is null) return;
|
||||
button.SetCurrentValue(ScrollToButton.DirectionProperty, args.NewValue.Value);
|
||||
}
|
||||
|
||||
private static ScrollToButton? EnsureButtonInAdorner(Control control)
|
||||
private static ScrollToButton EnsureButtonInAdorner(Control control)
|
||||
{
|
||||
var adorner = AdornerLayer.GetAdorner(control);
|
||||
if (adorner is not ScrollToButton button)
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Animation.Easings;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Styling;
|
||||
using Avalonia.VisualTree;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
using Ursa.Common;
|
||||
|
||||
namespace Ursa.Controls;
|
||||
@@ -64,7 +59,7 @@ public class ScrollToButton: Button
|
||||
}
|
||||
}
|
||||
|
||||
protected override async void OnClick()
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (_scroll is null) return;
|
||||
var vector = Direction switch
|
||||
|
||||
Reference in New Issue
Block a user