Make heartrate grid less confusing

Having all the grid lines in the same color made things visually
confusing. To clean this up a little make the heartrate lines a light gray
color.

Fixes #484

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-04-28 12:45:42 -07:00
parent dad3c5d9db
commit 2d24779b62
6 changed files with 8 additions and 4 deletions

View file

@ -38,6 +38,7 @@
#define BLACK1_LOW_TRANS QColor::fromRgbF(0.0, 0.0, 0.0, 0.75)
#define BLACK1_HIGH_TRANS QColor::fromRgbF(0.0, 0.0, 0.0, 0.25)
#define TUNDORA1_MED_TRANS QColor::fromRgbF(0.3, 0.3, 0.3, 0.5)
#define MED_GRAY_HIGH_TRANS QColor::fromRgbF(0.5, 0.5, 0.5, 0.25)
#define MERCURY1_MED_TRANS QColor::fromRgbF(0.9, 0.9, 0.9, 0.5)
#define CONCRETE1_LOWER_TRANS QColor::fromRgbF(0.95, 0.95, 0.95, 0.9)
#define WHITE1_MED_TRANS QColor::fromRgbF(1.0, 1.0, 1.0, 0.5)

View file

@ -43,6 +43,7 @@ void fill_profile_color()
profile_color[MEAN_DEPTH] = COLOR(REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS);
profile_color[HR_PLOT] = COLOR(REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS);
profile_color[HR_TEXT] = COLOR(REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS);
profile_color[HR_AXIS] = COLOR(MED_GRAY_HIGH_TRANS, MED_GRAY_HIGH_TRANS, MED_GRAY_HIGH_TRANS);
profile_color[DEPTH_BOTTOM] = COLOR(GOVERNORBAY1_MED_TRANS, BLACK1_HIGH_TRANS, GOVERNORBAY1_MED_TRANS);
profile_color[DEPTH_TOP] = COLOR(MERCURY1_MED_TRANS, WHITE1_MED_TRANS, MERCURY1_MED_TRANS);
profile_color[TEMP_TEXT] = COLOR(GOVERNORBAY2, BLACK1_LOW_TRANS, GOVERNORBAY2);

View file

@ -54,6 +54,7 @@ typedef enum {
MEAN_DEPTH,
HR_TEXT,
HR_PLOT,
HR_AXIS,
DEPTH_TOP,
DEPTH_BOTTOM,
TEMP_TEXT,

View file

@ -124,7 +124,7 @@ void emptyList(QList<T *> &list, double steps)
}
}
void DiveCartesianAxis::updateTicks()
void DiveCartesianAxis::updateTicks(color_indice_t color)
{
if (!scene())
return;
@ -220,7 +220,7 @@ void DiveCartesianAxis::updateTicks()
}
DiveLineItem *line = new DiveLineItem(this);
QPen pen;
pen.setBrush(getColor(TIME_GRID));
pen.setBrush(getColor(color));
pen.setCosmetic(true);
pen.setWidthF(2);
line->setPen(pen);

View file

@ -3,6 +3,7 @@
#include <QObject>
#include <QGraphicsLineItem>
#include <graphicsview-common.h>
class QPropertyAnimation;
class DiveTextItem;
@ -47,7 +48,7 @@ public:
int unitSystem;
public
slots:
virtual void updateTicks();
virtual void updateTicks(color_indice_t color = TIME_GRID);
signals:
void sizeChanged();

View file

@ -406,7 +406,7 @@ void ProfileWidget2::plotDives(QList<dive *> dives)
if (pInfo.maxhr) {
heartBeatAxis->setMinimum(pInfo.minhr);
heartBeatAxis->setMaximum(pInfo.maxhr);
heartBeatAxis->updateTicks(); // this shows the ticks
heartBeatAxis->updateTicks(HR_AXIS); // this shows the ticks
heartBeatAxis->setVisible(true);
} else {
heartBeatAxis->setVisible(false);