summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-02-26 17:44:58 +0100
committerUlf Hermann <ulf.hermann@digia.com>2014-03-11 12:30:24 +0200
commit03c324130677f3d1be1ad57d49d07dd6b61ff15c (patch)
tree7baa36da80580048ffa2189d815f3784c0464d18
parent1b60bc8d3dc8a6d4b06206f59865e6ecd3ea3c28 (diff)
downloadqt-creator-03c324130677f3d1be1ad57d49d07dd6b61ff15c.tar.gz
Saturate colors some more and use color selection from base class
The original colors were hard to discern from the background on certain devices. Change-Id: I276f2cd76e0a1be40040bf5a0557a288d10d37d9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
-rw-r--r--plugins/qmlprofilerextension/pixmapcachemodel.cpp5
-rw-r--r--plugins/qmlprofilerextension/pixmapcachemodel.h2
-rw-r--r--plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.cpp b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
index def302e475..dc26db9c77 100644
--- a/plugins/qmlprofilerextension/pixmapcachemodel.cpp
+++ b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
@@ -90,10 +90,9 @@ QColor PixmapCacheModel::getColor(int index) const
{
Q_D(const PixmapCacheModel);
if (d->range(index).pixmapEventType == PixmapCacheCountChanged)
- return QColor::fromHsl(240, 76, 166);
+ return getColorByHue(PixmapCacheCountHue);
- int ndx = getEventId(index);
- return QColor::fromHsl((ndx*25)%360, 76, 166);
+ return getEventColor(index);
}
float PixmapCacheModel::getHeight(int index) const
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.h b/plugins/qmlprofilerextension/pixmapcachemodel.h
index e1bafd6552..b0470f3713 100644
--- a/plugins/qmlprofilerextension/pixmapcachemodel.h
+++ b/plugins/qmlprofilerextension/pixmapcachemodel.h
@@ -71,6 +71,8 @@ public:
void clear();
private:
+ static const int PixmapCacheCountHue = 240;
+
class PixmapCacheModelPrivate;
Q_DECLARE_PRIVATE(PixmapCacheModel)
};
diff --git a/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp b/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp
index 574f115e24..584186c0ac 100644
--- a/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp
+++ b/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp
@@ -103,7 +103,7 @@ QColor SceneGraphTimelineModel::getColor(int index) const
double fpsFraction = 1 / (eventDuration * 60.0);
if (fpsFraction > 1.0)
fpsFraction = 1.0;
- return QColor::fromHsl((fpsFraction*96)+10, 76, 166);
+ return getFractionColor(fpsFraction);
}
QString labelForSGType(int t)