summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/tankitem.cpp3
-rw-r--r--qt-ui/profile/tankitem.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/profile/tankitem.cpp b/qt-ui/profile/tankitem.cpp
index 619368051..59acb28e0 100644
--- a/qt-ui/profile/tankitem.cpp
+++ b/qt-ui/profile/tankitem.cpp
@@ -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
diff --git a/qt-ui/profile/tankitem.h b/qt-ui/profile/tankitem.h
index d5c4b7f37..907bc0e34 100644
--- a/qt-ui/profile/tankitem.h
+++ b/qt-ui/profile/tankitem.h
@@ -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;
};