summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsvistastyle.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-07-14 15:45:36 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-07-15 14:12:20 +0000
commitf0f6d1634550f347d03c95c4cdd60a54860aa4bf (patch)
tree092a6e24b0a54b9d642d34cc2f2b985d56558e2a /src/widgets/styles/qwindowsvistastyle.cpp
parent7833f4852ab4c44a1fae75cfb1221e19a7b3256c (diff)
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>
Diffstat (limited to 'src/widgets/styles/qwindowsvistastyle.cpp')
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp2
1 files changed, 2 insertions, 0 deletions
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<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))) {