mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Give oxygen a proper colour in the tankbar
Oxygen should be representad by its own solid green colour not the yellow/green of nitrox. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
88d806f218
commit
4b98d17800
2 changed files with 4 additions and 1 deletions
|
@ -23,6 +23,7 @@ TankItem::TankItem(QObject *parent) :
|
|||
nitroxGradient.setColorAt(0.5, yellow);
|
||||
nitroxGradient.setColorAt(1.0, yellow);
|
||||
nitrox = nitroxGradient;
|
||||
oxygen = green;
|
||||
QLinearGradient trimixGradient(QPointF(0, 0), QPointF(0, height));
|
||||
trimixGradient.setColorAt(0.0, green);
|
||||
trimixGradient.setColorAt(0.49, green);
|
||||
|
@ -63,6 +64,8 @@ void TankItem::createBar(qreal x, qreal w, struct gasmix *gas)
|
|||
rect->setBrush(air);
|
||||
else if (gas->he.permille)
|
||||
rect->setBrush(trimix);
|
||||
else if (gas->o2.permille == 1000)
|
||||
rect->setBrush(oxygen);
|
||||
else
|
||||
rect->setBrush(nitrox);
|
||||
rect->setPen(QPen(QBrush(), 0.0)); // get rid of the thick line around the rectangle
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
struct plot_data *pInfoEntry;
|
||||
int pInfoNr;
|
||||
qreal yPos, height;
|
||||
QBrush air, nitrox, trimix;
|
||||
QBrush air, nitrox, oxygen, trimix;
|
||||
QList<QGraphicsRectItem *> rects;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue