diff options
-rw-r--r-- | gui/widget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 38e8cfb322..4af135a7ee 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -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 - |