mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
use colors from RideList in htmlSummary
Rob Carlsen suggested that the htmlSummary should use the same colors as in the ride list. I agree, but they're a little to light, so bump the saturation a bit. While we're at it, go ahead and do the zones list, too.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <QMessageBox>
|
||||
#include "Zones.h"
|
||||
#include "TimeUtils.h"
|
||||
#include <QtGui>
|
||||
#include <QtAlgorithms>
|
||||
#include <qcolor.h>
|
||||
#include <assert.h>
|
||||
@@ -689,12 +690,17 @@ QString Zones::summarize(int rnum, QVector<double> &time_in_zone) const
|
||||
summary += "<td align=\"center\">High</td>";
|
||||
summary += "<td align=\"center\">Time</td>";
|
||||
summary += "</tr>";
|
||||
QColor color = QApplication::palette().alternateBase().color();
|
||||
color = QColor::fromHsv(color.hue(), color.saturation() * 2, color.value());
|
||||
for (int zone = 0; zone < time_in_zone.size(); ++zone) {
|
||||
if (time_in_zone[zone] > 0.0) {
|
||||
QString name, desc;
|
||||
int lo, hi;
|
||||
zoneInfo(rnum, zone, name, desc, lo, hi);
|
||||
summary += "<tr>";
|
||||
if (zone % 2 == 0)
|
||||
summary += "<tr bgcolor='" + color.name() + "'>";
|
||||
else
|
||||
summary += "<tr>";
|
||||
summary += QString("<td align=\"center\">%1</td>").arg(name);
|
||||
summary += QString("<td align=\"center\">%1</td>").arg(desc);
|
||||
summary += QString("<td align=\"center\">%1</td>").arg(lo);
|
||||
|
||||
Reference in New Issue
Block a user