summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-01-08 09:18:52 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-01-08 10:26:52 (GMT)
commit9b0502aa6abf6bb9c07f205bccdf2d9c65027bde (patch)
tree638d573a1ad45e91b5e2de984c122d7de86fac9e /src/gui/styles/qstylesheetstyle.cpp
parent59a8e0200b912481ff750401ef10c588ad9bd872 (diff)
downloadQt-9b0502aa6abf6bb9c07f205bccdf2d9c65027bde.zip
Qt-9b0502aa6abf6bb9c07f205bccdf2d9c65027bde.tar.gz
Qt-9b0502aa6abf6bb9c07f205bccdf2d9c65027bde.tar.bz2
Fixes: Checked QPushbutton ignores stylesheet backround:
This is because the light() color of the palette is used and it was not modified. Task-number: QTBUG-7216 Reviewed-by: jbache
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index aff3ac0..56cc364 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1350,6 +1350,12 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette
if (br != QPalette::NoRole)
p->setBrush(br, bg->brush);
p->setBrush(QPalette::Window, bg->brush);
+ if (bg->brush.style() == Qt::SolidPattern) {
+ p->setBrush(QPalette::Light, bg->brush.color().lighter(115));
+ p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107));
+ p->setBrush(QPalette::Dark, bg->brush.color().darker(150));
+ p->setBrush(QPalette::Shadow, bg->brush.color().darker(300));
+ }
}
if (!hasPalette())