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 <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-07-02 11:21:28 -03:00
parent b07429ff8b
commit 94c2e5dc18

View file

@ -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));