From 60f19a0f2cc98d7f936d1dd3915b3408b9f262f6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 4 Jun 2006 17:41:49 +0000 Subject: Fixes slider drawing. svn-id: r22918 --- gui/widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') 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 - -- cgit v1.2.3