From 96d66d37e895c49cc325267969d8f81d4f10db41 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 13 Jul 2017 10:32:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=80=EC=88=98=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/slider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/gui/oven_control/slider.cpp b/app/gui/oven_control/slider.cpp index 78e41b5..7bbab93 100644 --- a/app/gui/oven_control/slider.cpp +++ b/app/gui/oven_control/slider.cpp @@ -243,8 +243,8 @@ void Slider::resizeEvent(QResizeEvent */*event*/) int Slider::calcSliderPosition(int mouseX) { - int x = qBound(grooveMin, mouseX, grooveMax); - qreal pos = (qreal) (x - grooveMin) / (grooveMax - grooveMin) * (maximum_ - minimum_) + minimum_; + int x = qBound(minSliderX, mouseX, maxSliderX); + qreal pos = (qreal) (x - minSliderX) / (maxSliderX - minSliderX) * (maximum_ - minimum_) + minimum_; return qRound(pos); } @@ -255,8 +255,8 @@ int Slider::calcSubLength(int value) void Slider::updatePixmapPosition() { - grooveMin = (width() - sub.width()) / 2; - grooveMax = width() - grooveMin; + minSliderX = (width() - sub.width()) / 2; + maxSliderX = width() - minSliderX; groovePoint = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2); subPoint = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2); -- 2.1.4