diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-04-27 10:48:13 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-04-27 10:48:13 +0200 |
commit | df7148b7a81a242f0399b3517ace87e080c298dc (patch) | |
tree | d7481b4e92ac1cc94fb90596169014df02541273 | |
parent | 291db5cd9dccbaf81732957bbda9c30b07a577e9 (diff) |
Make inner component headers look less shiny.
Done-by: jens
-rw-r--r-- | library/style/manhattanstyle.cpp | 10 | ||||
-rw-r--r-- | library/style/stylehelper.cpp | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/library/style/manhattanstyle.cpp b/library/style/manhattanstyle.cpp index 64afbac..6823437 100644 --- a/library/style/manhattanstyle.cpp +++ b/library/style/manhattanstyle.cpp @@ -923,13 +923,19 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt painter->drawPixmap(rect.topLeft(), pixmap); } - painter->setPen(StyleHelper::borderColor()); + bool lightColored = (widget && widget->property("lightColored").toBool()); + + if (lightColored) + painter->setPen(QColor(0x888888)); + else + painter->setPen(StyleHelper::borderColor()); if (horizontal) { // Note: This is a hack to determine if the // toolbar should draw the top or bottom outline // (needed for the find toolbar for instance) - QColor lighter(255, 255, 255, 40); + + QColor lighter(255, 255, 255, lightColored ? 180 : 40); if (widget && widget->property("topBorder").toBool()) { painter->drawLine(rect.topLeft(), rect.topRight()); painter->setPen(lighter); diff --git a/library/style/stylehelper.cpp b/library/style/stylehelper.cpp index c4bff2d..dfde259 100644 --- a/library/style/stylehelper.cpp +++ b/library/style/stylehelper.cpp @@ -185,6 +185,14 @@ void StyleHelper::verticalGradient(QPainter *painter, const QRect &spanRect, con static void horizontalGradientHelper(QPainter *p, const QRect &spanRect, const QRect &rect, bool lightColored) { + if (lightColored) { + QLinearGradient shadowGradient(rect.topLeft(), rect.bottomLeft()); + shadowGradient.setColorAt(0, 0xf0f0f0); + shadowGradient.setColorAt(1, 0xcfcfcf); + p->fillRect(rect, shadowGradient); + return; + } + QColor base = StyleHelper::baseColor(lightColored); QColor highlight = StyleHelper::highlightColor(lightColored); QColor shadow = StyleHelper::shadowColor(lightColored); |