aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/Slider.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs
index 36f7e731..97c8b384 100644
--- a/src/GraphicObjects/Slider.cs
+++ b/src/GraphicObjects/Slider.cs
@@ -165,14 +165,14 @@ namespace Crow
cursor = new Rectangle (new Size (_cursorSize, (int)(r.Height)));
p1 = r.TopLeft + new Point (_cursorSize / 2, r.Height / 2);
unity = (double)(r.Width - _cursorSize) / (Maximum - Minimum);
- cursor.TopLeft = new Point (r.Left + (int)(Value * unity),
+ cursor.TopLeft = new Point (r.Left + (int)((Value - Minimum) * unity),
(int)(p1.Y - cursor.Height / 2));
} else {
cursor = new Rectangle (new Size ((int)(r.Width), _cursorSize));
p1 = r.TopLeft + new Point (r.Width / 2, _cursorSize / 2);
unity = (double)(r.Height - _cursorSize) / (Maximum - Minimum);
cursor.TopLeft = new Point ((int)(p1.X - r.Width / 2),
- r.Top + (int)(Value * unity));
+ r.Top + (int)((Value - Minimum) * unity));
}
cursor.Inflate (-1);
}