From 5519be4bc609c71676c269f286156d064242696c Mon Sep 17 00:00:00 2001
From: victor <taehoon@falinux.com>
Date: Thu, 13 Jul 2017 10:41:03 +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 | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/app/gui/oven_control/slider.cpp b/app/gui/oven_control/slider.cpp
index 7bbab93..4bc62de 100644
--- a/app/gui/oven_control/slider.cpp
+++ b/app/gui/oven_control/slider.cpp
@@ -193,7 +193,7 @@ void Slider::mouseReleaseEvent(QMouseEvent */*event*/)
void Slider::paintEvent(QPaintEvent */*event*/)
{
QPainter painter(this);
- painter.drawPixmap(groovePoint, groove);
+ painter.drawPixmap(grooveLeftTop, groove);
QPen tickPen(QColor(71, 71, 71));
tickPen.setWidth(2);
@@ -202,36 +202,36 @@ void Slider::paintEvent(QPaintEvent */*event*/)
if (tickInterval)
for (int tick = minimum_; tick <= maximum_; tick += tickInterval)
{
- int x = subPoint.x() + calcSubLength(tick);
- painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 28);
+ int x = subLeftTop.x() + calcSubLength(tick);
+ painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 28);
}
else
foreach (int tick, ticks)
{
- int x = subPoint.x() + calcSubLength(tick);
- painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 28);
+ int x = subLeftTop.x() + calcSubLength(tick);
+ painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 28);
}
if (bigTickInterval)
for (int tick = minimum_; tick <= maximum_; tick += bigTickInterval)
{
- int x = subPoint.x() + calcSubLength(tick);
- painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 33);
+ int x = subLeftTop.x() + calcSubLength(tick);
+ painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 33);
}
else
foreach (int tick, bigTicks)
{
- int x = subPoint.x() + calcSubLength(tick);
- painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 33);
+ int x = subLeftTop.x() + calcSubLength(tick);
+ painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 33);
}
if (subVisible_)
{
int subLength = calcSubLength(sliderPosition_);
if (subLength > 0)
- painter.drawPixmap(subPoint, sub, QRect(0, 0, subLength, sub.height()));
+ painter.drawPixmap(subLeftTop, sub, QRect(0, 0, subLength, sub.height()));
- QPoint handlePoint(subPoint.x() + subLength - handle.width() / 2, (height() - handle.height()) / 2);
+ QPoint handlePoint(subLeftTop.x() + subLength - handle.width() / 2, (height() - handle.height()) / 2);
painter.drawPixmap(handlePoint, handle);
}
}
@@ -258,8 +258,8 @@ void Slider::updatePixmapPosition()
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);
+ grooveLeftTop = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2);
+ subLeftTop = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2);
}
void Slider::setValue(int value)
--
2.1.4