summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/color.h1
-rw-r--r--profile-widget/diveprofileitem.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/core/color.h b/core/color.h
index 246808d19..12dcb1497 100644
--- a/core/color.h
+++ b/core/color.h
@@ -65,6 +65,7 @@
// Magentas
#define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF(0.7, 0.2, 0.7, 0.1)
+#define MAGENTA QColor::fromRgbF(1.0, 0.0, 1.0, 1.0)
#define SAC_COLORS_START_IDX SAC_1
#define SAC_COLORS 9
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 6d5cdb2da..521e3fb82 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -809,7 +809,10 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
else
pen.setBrush(MED_GRAY_HIGH_TRANS);
} else {
- pen.setBrush(getPressureColor(entry->density));
+ if (vAxis->valueAt(poly[i]) < 0)
+ pen.setBrush(MAGENTA);
+ else
+ pen.setBrush(getPressureColor(entry->density));
}
painter->setPen(pen);
painter->drawLine(poly[i - 1], poly[i]);