fix: fix vertical direction.

This commit is contained in:
rabbitism
2024-01-14 23:22:42 +08:00
parent 30241f3f22
commit 5b7dd69f51

View File

@@ -230,7 +230,7 @@ public abstract class NumericUpDown : TemplatedControl
private int GetDelta(Point point)
{
bool horizontal = Math.Abs(point.X) > Math.Abs(point.Y);
var value = horizontal ? point.X : point.Y;
var value = horizontal ? point.X : -point.Y;
return value switch
{
> 0 => 1,