Fixes slider drawing.

svn-id: r22918
This commit is contained in:
Johannes Schickel 2006-06-04 17:41:49 +00:00
parent b5bc1c82fa
commit 60f19a0f2c

View File

@ -299,11 +299,11 @@ void SliderWidget::drawWidget(bool hilite) {
}
int SliderWidget::valueToPos(int value) {
return ((_w - 4) * (value - _valueMin) / (_valueMax - _valueMin));
return (_w * (value - _valueMin) / (_valueMax - _valueMin));
}
int SliderWidget::posToValue(int pos) {
return (pos) * (_valueMax - _valueMin) / (_w - 4) + _valueMin;
return (pos) * (_valueMax - _valueMin) / _w + _valueMin;
}
#pragma mark -