aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 640192d55..eb8f51afa 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -242,16 +242,16 @@ void DivePlannerGraphics::createDecoStops()
diveBg->setPolygon(poly);
QRectF b = poly.boundingRect();
- QLinearGradient linearGrad(
+ QLinearGradient pat(
b.x(),
b.y(),
b.x(),
b.height() + b.y()
);
- linearGrad.setColorAt(0, Qt::green);
- linearGrad.setColorAt(1, Qt::white);
- diveBg->setBrush(linearGrad);
+ pat.setColorAt(1, profile_color[DEPTH_BOTTOM].first());
+ pat.setColorAt(0, profile_color[DEPTH_TOP].first());
+ diveBg->setBrush(pat);
deleteTemporaryDivePlan(diveplan.dp);
}
@@ -409,7 +409,7 @@ void Ruler::updateTicks()
double steps = (max - min) / interval;
double stepSize = (m.x2() - m.x1()) / steps;
qreal pos;
- for (pos = m.x1(); pos < m.x2(); pos += stepSize) {
+ for (qreal pos = m.x1(); pos < m.x2(); pos += stepSize) {
ticks.push_back(new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this));
}
ticks.push_back(new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this));