diff options
Diffstat (limited to 'src/widgets/styles/qwindowsvistastyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsvistastyle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 1aecb64acf..c18b2266b8 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -586,10 +586,12 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt bool isEnabled = option->state & State_Enabled; uint resolve_mask = panel->palette.resolve(); if (widget) { - //Since spin box and combo box includes a line edit we need to resolve the palette on the parent instead + // Since spin box includes a line edit we need to resolve the palette mask also from + // the parent, as while the color is always correct on the palette supplied by panel, + // the mask can still be empty. If either mask specifies custom base color, use that. #ifndef QT_NO_SPINBOX if (QAbstractSpinBox *spinbox = qobject_cast<QAbstractSpinBox*>(widget->parentWidget())) - resolve_mask = spinbox->palette().resolve(); + resolve_mask |= spinbox->palette().resolve(); #endif // QT_NO_SPINBOX } if (resolve_mask & (1 << QPalette::Base)) { |