summaryrefslogtreecommitdiff
path: root/src/gui/widgets/slider.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-02 13:20:23 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-02 13:20:23 +0300
commit39a3fd884d6d585825d9f80a578c6f466a856ec3 (patch)
treeee0184c30b08dd452ae9e4e523a9bb6aa291f33b /src/gui/widgets/slider.cpp
parent35278ed7f80ed8a02785573d510c36b38998debe (diff)
downloadmanaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.gz
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.bz2
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.xz
manaplus-39a3fd884d6d585825d9f80a578c6f466a856ec3.zip
Set correct step in sliders.
Diffstat (limited to 'src/gui/widgets/slider.cpp')
-rw-r--r--src/gui/widgets/slider.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 66265a919..6119fc624 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -91,12 +91,13 @@ static std::string const data[2] =
};
Slider::Slider(Widget2 *const widget,
- const double scaleEnd) :
+ const double scaleEnd,
+ const double stepLength) :
Widget(widget),
MouseListener(),
KeyListener(),
mValue(0),
- mStepLength(scaleEnd / 10),
+ mStepLength(stepLength),
mScaleStart(0),
mScaleEnd(scaleEnd),
mOrientation(HORIZONTAL),
@@ -110,12 +111,13 @@ Slider::Slider(Widget2 *const widget,
Slider::Slider(Widget2 *const widget,
const double scaleStart,
- const double scaleEnd) :
+ const double scaleEnd,
+ const double stepLength) :
Widget(widget),
MouseListener(),
KeyListener(),
mValue(scaleStart),
- mStepLength((scaleEnd - scaleStart) / 10),
+ mStepLength(stepLength),
mScaleStart(scaleStart),
mScaleEnd(scaleEnd),
mOrientation(HORIZONTAL),