summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-04-15 03:12:47 +0000
committerTim E. Real <termtech@rogers.com>2011-04-15 03:12:47 +0000
commit15ceeacaf980aff12311a25293e2c4772087af04 (patch)
treefd572b364cf0aa0981e09645496819d6578f0301
parent7303c41c6de1c6823de4cfb2d314e42a2ad9ff5f (diff)
Previous part drawing improvements fix: Support Qt4.5
-rw-r--r--muse2/muse/widgets/utils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp
index 693f3c36..38574d94 100644
--- a/muse2/muse/widgets/utils.cpp
+++ b/muse2/muse/widgets/utils.cpp
@@ -361,12 +361,12 @@ bool autoAdjustFontSize(QFrame* w, const QString& s, bool ignoreWidth, bool igno
QGradient gGradientFromQColor(const QColor& c, const QPointF& start, const QPointF& finalStop)
{
- int h = c.hsvHue(), s = c.hsvSaturation(), a = c.alpha();
- int cv = c.value();
- int v0 = cv + (255 - cv)/2;
- int v1 = cv - cv/2;
- QColor c0 = QColor::fromHsv(h, s, v0, a);
- QColor c1 = QColor::fromHsv(h, s, v1, a);
+ int h, s, v, a;
+ c.getHsv(&h, &s, &v, &a);
+ const int v0 = v + (255 - v)/2;
+ const int v1 = v - v/2;
+ const QColor c0 = QColor::fromHsv(h, s, v0, a);
+ const QColor c1 = QColor::fromHsv(h, s, v1, a);
QLinearGradient gradient(start, finalStop);
gradient.setColorAt(0, c0);