forked from qt-creator/qt-creator
Windows: Fix submenu arrow style
Since dccf5a5ae7 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>
This commit is contained in:
@@ -608,9 +608,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
|||||||
case PE_IndicatorArrowDown:
|
case PE_IndicatorArrowDown:
|
||||||
case PE_IndicatorArrowRight:
|
case PE_IndicatorArrowRight:
|
||||||
case PE_IndicatorArrowLeft:
|
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);
|
StyleHelper::drawArrow(element, painter, option);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user