diff options
author | Liang Qi <liang.qi@qt.io> | 2019-04-11 07:47:21 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-04-11 07:47:21 +0200 |
commit | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (patch) | |
tree | 7ca5d4ba83888bb5ad4d9b0141e5c62f8a5138f2 /src/widgets/styles | |
parent | 235ac95520a0fc2c822dedce7358e3c64a764255 (diff) | |
parent | 63e88f60a769f2535945db0e1cabb9815ff45a77 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/widgets/styles/qstyle_p.h
Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qstyle.cpp | 8 | ||||
-rw-r--r-- | src/widgets/styles/qstyle_p.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 97ec1d3f19..ec5b6df6b3 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -46,6 +46,7 @@ #include "qstyleoption.h" #include "private/qstyle_p.h" #include "private/qguiapplication_p.h" +#include <qpa/qplatformtheme.h> #ifndef QT_NO_DEBUG #include "qdebug.h" #endif @@ -2447,6 +2448,13 @@ void QStyle::setProxy(QStyle *style) d->proxyStyle = style; } +//Windows and KDE allow menus to cover the taskbar, while GNOME and macOS don't +bool QStylePrivate::useFullScreenForPopup() +{ + auto theme = QGuiApplicationPrivate::platformTheme(); + return theme && theme->themeHint(QPlatformTheme::UseFullScreenForPopupMenu).toBool(); +} + QT_END_NAMESPACE #include "moc_qstyle.cpp" diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h index d68bbfd03b..7942cafaf7 100644 --- a/src/widgets/styles/qstyle_p.h +++ b/src/widgets/styles/qstyle_p.h @@ -67,6 +67,9 @@ class QStylePrivate: public QObjectPrivate public: inline QStylePrivate() : layoutSpacingIndex(-1), proxyStyle(nullptr) {} + + static bool useFullScreenForPopup(); + mutable int layoutSpacingIndex; QStyle *proxyStyle; }; |