summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-10 01:00:07 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-10 01:00:08 +0200
commitff88e20b8328b6aad5b787aacc5c39da563a67b1 (patch)
tree1c624086b71fa968b67789d9a3146509f07f58ae /src/widgets/styles
parentac244dbcf21e730c9314a47736cbc46ee19eb787 (diff)
parent1029a2e01051cd35452941e7b49b36520481cdf0 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qstyle.cpp8
-rw-r--r--src/widgets/styles/qstyle_p.h3
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 cdea29f944..5bbde5fe17 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(0) {}
+
+ static bool useFullScreenForPopup();
+
mutable int layoutSpacingIndex;
QStyle *proxyStyle;
};