From f0f6d1634550f347d03c95c4cdd60a54860aa4bf Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 14 Jul 2015 15:45:36 +0200 Subject: [PATCH] QWindowsVistaStyle: Don't use new style background on Controls ComboBox We use menus to implement the ComboBox popup in QtQuick Controls, and therefore, all the items are actual menu items. If that's the case, we can skip the new style background. Task-number: QTBUG-47084 Change-Id: If46ebf8115b36f45b4b5e6068ddc0d61afe307b8 Reviewed-by: J-P Nurmi Reviewed-by: Friedemann Kleint --- src/widgets/styles/qwindowsvistastyle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index d3e7e457ea..b8ed82fee3 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -657,6 +657,8 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt newStyle = !qobject_cast(view); selectionBehavior = view->selectionBehavior(); selectionMode = view->selectionMode(); + } else if (!widget) { + newStyle = !QStyleHelper::hasAncestor(option->styleObject, QAccessible::MenuItem) ; } if (newStyle && (vopt = qstyleoption_cast(option))) {