summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index f4b21d3b70d..87259f8ec9d 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1423,10 +1423,10 @@ void setDefault(QPalette *palette, QPalette::ColorGroup group, QPalette::ColorRo
const QBrush &defaultBrush, const QWidget *widget)
{
const QPalette &widgetPalette = widget->palette();
- if (widgetPalette.isBrushSet(group, role))
- palette->setBrush(group, role, widgetPalette.brush(group, role));
- else
+ if (defaultBrush != Qt::NoBrush)
palette->setBrush(group, role, defaultBrush);
+ else
+ palette->setBrush(group, role, widgetPalette.brush(group, role));
}
void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const QWidget *w, bool embedded)