aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-03-11 12:28:41 +0100
committerEike Ziller <eike.ziller@qt.io>2019-03-26 07:50:47 +0000
commit8ff29ff19d45c8dfc8745b63108d74260e449eb2 (patch)
tree966c03e01469605f41f1e5d916d44bc7314eacd3
parent47d159273e818dabec8dcb20c9e3cb62cad02bfc (diff)
Windows: Fix submenu arrow stylev4.9.0-rc1
Since dccf5a5ae7cda289be1796f145742ccfe478f086 the submenus have the parent menu as an actual parent widget. That makes ManhattanStyle handle them differently, because they are now children of the menu bar, and therefore considered "panel widgets" to be styled. An undesired side-effect is that ManhattanStyle decides to style the submenu arrows itself then. The patch makes ManhattanStyle not style arrows if they are painted as part of a menu. Fixes: QTCREATORBUG-21376 Change-Id: Ia5556c7327c3f0c2f21cadc86047bec785da27df Reviewed-by: Robert Loehning <robert.loehning@qt.io>
-rw-r--r--src/plugins/coreplugin/manhattanstyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index 78e819a9c3..709dcf62aa 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -608,9 +608,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
case PE_IndicatorArrowDown:
case PE_IndicatorArrowRight:
case PE_IndicatorArrowLeft:
- {
+ if (qobject_cast<const QMenu *>(widget)) // leave submenu arrow painting alone
+ QProxyStyle::drawPrimitive(element, option, painter, widget);
+ else
StyleHelper::drawArrow(element, painter, option);
- }
break;
default: