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 <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Gabriel de Dietrich 2015-07-14 15:45:36 +02:00
parent 7833f4852a
commit f0f6d16345

View File

@ -657,6 +657,8 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
newStyle = !qobject_cast<const QTableView*>(view);
selectionBehavior = view->selectionBehavior();
selectionMode = view->selectionMode();
} else if (!widget) {
newStyle = !QStyleHelper::hasAncestor(option->styleObject, QAccessible::MenuItem) ;
}
if (newStyle && (vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option))) {