From 8ff29ff19d45c8dfc8745b63108d74260e449eb2 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 11 Mar 2019 12:28:41 +0100 Subject: Windows: Fix submenu arrow style 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 --- src/plugins/coreplugin/manhattanstyle.cpp | 5 +++-- 1 file 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(widget)) // leave submenu arrow painting alone + QProxyStyle::drawPrimitive(element, option, painter, widget); + else StyleHelper::drawArrow(element, painter, option); - } break; default: -- cgit v1.2.3