summaryrefslogtreecommitdiff
path: root/src/gui/widgets/slider.cpp
diff options
context:
space:
mode:
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),