summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseniy-Movshev <dodoradio@outlook.com>2023-05-30 13:25:36 +0100
committerArseniy-Movshev <dodoradio@outlook.com>2023-05-30 14:04:32 +0100
commitebfdff8dc1f84921373b7ea3b379193b6da69b8e (patch)
tree269c12921cb013be73e826cfbb7ba4a45de660df
parent94238a02c8a947593d69a6271b3fd1cf5e264be2 (diff)
Fix incorred height and width usage
-rw-r--r--qmlplugin/hrGraph.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qmlplugin/hrGraph.cpp b/qmlplugin/hrGraph.cpp
index 625300e..5c38026 100644
--- a/qmlplugin/hrGraph.cpp
+++ b/qmlplugin/hrGraph.cpp
@@ -59,7 +59,7 @@ void HrGraph::paint(QPainter *painter)
for(int i = 0; i < j; i++) {
calculatedTimeSeconds = (m_filedata.at(i).time - minTime)/timeDelta;
calculatedValue = 1 - (m_filedata.at(i).value - minHrValue)/valueDelta;
- points[i] = QPointF(m_lineWidth + calculatedTimeSeconds*(height()-2*m_lineWidth), m_lineWidth + calculatedValue*(width()-2*m_lineWidth)); //these +2 -1 are here to make sure that the graph fits within the drawn area, as it will be clipped by qt if it doesn't.
+ points[i] = QPointF(m_lineWidth + calculatedTimeSeconds*(width()-2*m_lineWidth), m_lineWidth + calculatedValue*(height()-2*m_lineWidth)); //these +2 -1 are here to make sure that the graph fits within the drawn area, as it will be clipped by qt if it doesn't.
}
QPen pen;
pen.setWidthF(m_lineWidth);