From 4b98d17800e95f78b154694117ab0c24d21ef148 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Mon, 5 Jan 2015 20:24:34 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/tankitem.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/profile/tankitem.cpp') 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 -- cgit v1.2.3-70-g09d2