diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-02 13:20:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-02 13:20:23 +0300 |
commit | 39a3fd884d6d585825d9f80a578c6f466a856ec3 (patch) | |
tree | ee0184c30b08dd452ae9e4e523a9bb6aa291f33b /src/gui/widgets/slider.cpp | |
parent | 35278ed7f80ed8a02785573d510c36b38998debe (diff) | |
download | mv-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.gz mv-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.bz2 mv-39a3fd884d6d585825d9f80a578c6f466a856ec3.tar.xz mv-39a3fd884d6d585825d9f80a578c6f466a856ec3.zip |
Set correct step in sliders.
Diffstat (limited to 'src/gui/widgets/slider.cpp')
-rw-r--r-- | src/gui/widgets/slider.cpp | 10 |
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), |