From d7a5d6a98d237f48edd71458cf6fb24d5c9f01e1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 27 Jan 2020 10:32:18 +0100 Subject: Windows style: Fix wrong color of non-editable combo box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QPalette::Button instead of Base as does QFusionStyle so that style sheets specifying colors for the non-editable case work correctly. Fixes: QTBUG-81573 Change-Id: I84cecb38a48a1450c82498558aa350f3e60a5df6 Reviewed-by: André de la Rocha Reviewed-by: Oliver Wolff --- src/widgets/styles/qwindowsstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 8496a2c223..4f8cc56e05 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -2119,7 +2119,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp #if QT_CONFIG(combobox) case CC_ComboBox: if (const QStyleOptionComboBox *cmb = qstyleoption_cast(opt)) { - QBrush editBrush = cmb->palette.brush(QPalette::Base); + QBrush editBrush = cmb->palette.brush(QPalette::Button); if ((cmb->subControls & SC_ComboBoxFrame)) { if (cmb->frame) { QPalette shadePal = opt->palette; -- cgit v1.2.3