QDockWidget: Fix icons being too large when using a style proxying Windows style
Extend the check for Windows style to QProxyStyle. Amends 43b9c9b9937c5aaeec611bd32a50a15e81573550. Task-number: QTBUG-38776 Change-Id: I5331d0c29bea59c59309feeab153437a72e0e30f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
97f4366202
commit
364d3da3d5
@ -45,6 +45,7 @@
|
|||||||
#include <qdrawutil.h>
|
#include <qdrawutil.h>
|
||||||
#include <qevent.h>
|
#include <qevent.h>
|
||||||
#include <qfontmetrics.h>
|
#include <qfontmetrics.h>
|
||||||
|
#include <qproxystyle.h>
|
||||||
#include <qwindow.h>
|
#include <qwindow.h>
|
||||||
#include <qscreen.h>
|
#include <qscreen.h>
|
||||||
#include <qmainwindow.h>
|
#include <qmainwindow.h>
|
||||||
@ -166,6 +167,10 @@ static inline bool isWindowsStyle(const QStyle *style)
|
|||||||
if (style->inherits("QStyleSheetStyle"))
|
if (style->inherits("QStyleSheetStyle"))
|
||||||
effectiveStyle = static_cast<const QStyleSheetStyle *>(style)->baseStyle();
|
effectiveStyle = static_cast<const QStyleSheetStyle *>(style)->baseStyle();
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(QT_NO_STYLE_PROXY)
|
||||||
|
if (style->inherits("QProxyStyle"))
|
||||||
|
effectiveStyle = static_cast<const QProxyStyle *>(style)->baseStyle();
|
||||||
|
#endif
|
||||||
|
|
||||||
return effectiveStyle->inherits("QWindowsStyle");
|
return effectiveStyle->inherits("QWindowsStyle");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user