From 03c324130677f3d1be1ad57d49d07dd6b61ff15c Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 26 Feb 2014 17:44:58 +0100 Subject: 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 --- plugins/qmlprofilerextension/pixmapcachemodel.cpp | 5 ++--- plugins/qmlprofilerextension/pixmapcachemodel.h | 2 ++ plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp | 2 +- 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) -- cgit v1.2.1