From 94c2e5dc18e5dcf8bd4d69cc82f2798a85b85bc0 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 2 Jul 2013 11:21:28 -0300 Subject: Correct collors for the DivePlanner background. Use the correct colors for the Background on the Dive Plan, same as on the Profile. Signed-off-by: Tomaz Canabrava --- qt-ui/diveplanner.cpp | 10 +++++----- 1 file 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)); -- cgit v1.2.3-70-g09d2