Browse Source
Merge pull request #4124 from ahopper/fix-non-zero-Minimum-on-slider
fix non zero minimum on slider
pull/4125/head
Dariusz Komosiński
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Controls/Slider.cs
|
|
|
@ -201,7 +201,7 @@ namespace Avalonia.Controls |
|
|
|
var invert = orient ? 0 : 1; |
|
|
|
var calcVal = Math.Abs(invert - logicalPos); |
|
|
|
var range = Maximum - Minimum; |
|
|
|
var finalValue = calcVal * range; |
|
|
|
var finalValue = calcVal * range + Minimum; |
|
|
|
|
|
|
|
Value = IsSnapToTickEnabled ? SnapToTick(finalValue) : finalValue; |
|
|
|
} |
|
|
|
|