Skip to content
Snippets Groups Projects
Commit 812d08c6 authored by jpbl's avatar jpbl
Browse files

VolumeControl::vertical has now higher values on the top

parent 01f90cf9
No related branches found
No related tags found
No related merge requests found
......@@ -128,7 +128,7 @@ void
VolumeControl::updateSlider(int value)
{
if(mOrientation == VolumeControl::Vertical) {
mSlider->move(mSlider->x(), (float)value / (mMax - mMin) * mMaxPosition);
mSlider->move(mSlider->x(), mMaxPosition - (int)((float)value / (mMax - mMin) * mMaxPosition));
}
else {
mSlider->move(value / (mMax - mMin) * mMaxPosition, mSlider->y());
......@@ -139,7 +139,7 @@ int
VolumeControl::offset()
{
if(mOrientation == VolumeControl::Vertical) {
return mSlider->y();
return mMaxPosition - mSlider->y();
}
else {
return mSlider->x();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment