summaryrefslogtreecommitdiffstats
path: root/profile-widget/divetooltipitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/divetooltipitem.cpp')
-rw-r--r--profile-widget/divetooltipitem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp
index 4b422fe81..36b1a9b91 100644
--- a/profile-widget/divetooltipitem.cpp
+++ b/profile-widget/divetooltipitem.cpp
@@ -108,7 +108,7 @@ void ToolTipItem::expand()
width = title->boundingRect().width() + sp2;
// clip the height
if (entryToolTip.first) {
- const int minH = entryToolTip.first->y() + entryToolTip.first->pixmap().height() + sp2;
+ const int minH = lrint(entryToolTip.first->y() + entryToolTip.first->pixmap().height() + sp2);
if (height < minH)
height = minH;
} else if (height < iconMetrics.sz_small) {
@@ -245,7 +245,7 @@ void ToolTipItem::refresh(const QPointF &pos)
return;
refreshTime.start();
- int time = timeAxis->valueAt(pos);
+ int time = lrint(timeAxis->valueAt(pos));
if (time == lastTime)
return;
@@ -269,9 +269,9 @@ void ToolTipItem::refresh(const QPointF &pos)
painter.setPen(QColor(0, 0, 0, 255));
if (decoMode() == BUEHLMANN)
- painter.drawLine(0, 60 - entry->gfline / 2, 16, 60 - entry->gfline / 2);
- painter.drawLine(0, 60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2,
- 16, 60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2);
+ painter.drawLine(0, lrint(60 - entry->gfline / 2), 16, lrint(60 - entry->gfline / 2));
+ painter.drawLine(0, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2),
+ 16, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2));
painter.setPen(QColor(0, 0, 0, 127));
for (int i=0; i<16; i++) {
painter.drawLine(i, 60, i, 60 - entry->percentages[i] / 2);