QDockWidget: Fix icons being too large when using a style proxying Windows style

Extend the check for Windows style to QProxyStyle. Amends
43b9c9b993.

Task-number: QTBUG-38776
Change-Id: I5331d0c29bea59c59309feeab153437a72e0e30f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Friedemann Kleint 2018-09-25 09:34:54 +02:00
parent 97f4366202
commit 364d3da3d5

View File

@ -45,6 +45,7 @@
#include <qdrawutil.h>
#include <qevent.h>
#include <qfontmetrics.h>
#include <qproxystyle.h>
#include <qwindow.h>
#include <qscreen.h>
#include <qmainwindow.h>
@ -166,6 +167,10 @@ static inline bool isWindowsStyle(const QStyle *style)
if (style->inherits("QStyleSheetStyle"))
effectiveStyle = static_cast<const QStyleSheetStyle *>(style)->baseStyle();
#endif
#if !defined(QT_NO_STYLE_PROXY)
if (style->inherits("QProxyStyle"))
effectiveStyle = static_cast<const QProxyStyle *>(style)->baseStyle();
#endif
return effectiveStyle->inherits("QWindowsStyle");
}