Commit 96d66d37e895c49cc325267969d8f81d4f10db41

Authored by 김태훈
1 parent 690654b5b5
Exists in master and in 2 other branches fhd, fhd-demo

변수명 변경

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
app/gui/oven_control/slider.cpp
@@ -243,8 +243,8 @@ void Slider::resizeEvent(QResizeEvent */*event*/) @@ -243,8 +243,8 @@ void Slider::resizeEvent(QResizeEvent */*event*/)
243 243
244 int Slider::calcSliderPosition(int mouseX) 244 int Slider::calcSliderPosition(int mouseX)
245 { 245 {
246 - int x = qBound(grooveMin, mouseX, grooveMax);  
247 - qreal pos = (qreal) (x - grooveMin) / (grooveMax - grooveMin) * (maximum_ - minimum_) + minimum_; 246 + int x = qBound(minSliderX, mouseX, maxSliderX);
  247 + qreal pos = (qreal) (x - minSliderX) / (maxSliderX - minSliderX) * (maximum_ - minimum_) + minimum_;
248 return qRound(pos); 248 return qRound(pos);
249 } 249 }
250 250
@@ -255,8 +255,8 @@ int Slider::calcSubLength(int value) @@ -255,8 +255,8 @@ int Slider::calcSubLength(int value)
255 255
256 void Slider::updatePixmapPosition() 256 void Slider::updatePixmapPosition()
257 { 257 {
258 - grooveMin = (width() - sub.width()) / 2;  
259 - grooveMax = width() - grooveMin; 258 + minSliderX = (width() - sub.width()) / 2;
  259 + maxSliderX = width() - minSliderX;
260 260
261 groovePoint = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2); 261 groovePoint = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2);
262 subPoint = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2); 262 subPoint = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2);