summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylehelper.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-02 07:53:15 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-02 07:54:33 (GMT)
commit7a53f2071a6ef09993445b20d88206f3999302cb (patch)
treee48bd86aa41083132c4a45c9447453c492d6053d /src/gui/styles/qstylehelper.cpp
parent8044128f7cd9919bac6da34fd7b886d60a2d4e9e (diff)
downloadQt-7a53f2071a6ef09993445b20d88206f3999302cb.zip
Qt-7a53f2071a6ef09993445b20d88206f3999302cb.tar.gz
Qt-7a53f2071a6ef09993445b20d88206f3999302cb.tar.bz2
Visual tweaks on the new dial
Increased contrast and size of indicator line. Reviewed-by: nrc
Diffstat (limited to 'src/gui/styles/qstylehelper.cpp')
-rw-r--r--src/gui/styles/qstylehelper.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index bd67f93..3320970 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -252,6 +252,7 @@ void QStyleHelper::drawDial(const QStyleOptionSlider *option, QPainter *painter)
p->setBrush(Qt::NoBrush);
p->setPen(buttonColor.lighter(110));
p->drawEllipse(br.adjusted(1, 1, -1, -1));
+
if (option->state & QStyle::State_HasFocus) {
QColor highlight = pal.highlight().color();
highlight.setHsv(highlight.hue(),
@@ -274,20 +275,19 @@ void QStyleHelper::drawDial(const QStyleOptionSlider *option, QPainter *painter)
dialRect.center().y() + dialRect.width(),
dialRect.width()*2,
dialRect.center().x(), dialRect.center().y());
- dialGradient.setColorAt(1, buttonColor.darker(130));
- dialGradient.setColorAt(0.201, buttonColor.darker(105));
- dialGradient.setColorAt(0.2, buttonColor.darker(104));
- dialGradient.setColorAt(0, buttonColor.darker(102));
+ dialGradient.setColorAt(1, buttonColor.darker(140));
+ dialGradient.setColorAt(0.4, buttonColor.darker(120));
+ dialGradient.setColorAt(0, buttonColor.darker(110));
+ if (penSize > 3.0) {
+ painter->setPen(QPen(QColor(0, 0, 0, 25), penSize));
+ painter->drawLine(calcRadialPos(option, 0.90), calcRadialPos(option, 0.96));
+ }
painter->setBrush(dialGradient);
painter->setPen(QColor(255, 255, 255, 150));
painter->drawEllipse(dialRect.adjusted(-1, -1, 1, 1));
- painter->setPen(QColor(0, 0, 0, 50));
+ painter->setPen(QColor(0, 0, 0, 80));
painter->drawEllipse(dialRect);
- if (penSize > 3.0) {
- painter->setPen(QPen(QColor(0, 0, 0, 16), penSize/2.0));
- painter->drawLine(calcRadialPos(option, 0.95), calcRadialPos(option, 0.97));
- }
painter->restore();
}
#endif //QT_NO_DIAL