|
|
8d8a62 |
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
|
|
|
8d8a62 |
index 97e0203c..5bee160a 100644
|
|
|
8d8a62 |
--- a/src/client/qwaylandintegration.cpp
|
|
|
8d8a62 |
+++ b/src/client/qwaylandintegration.cpp
|
|
|
8d8a62 |
@@ -99,20 +99,26 @@ public:
|
|
|
8d8a62 |
|
|
|
8d8a62 |
if (QGuiApplication::desktopSettingsAware()) {
|
|
|
8d8a62 |
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
|
|
|
8d8a62 |
-
|
|
|
8d8a62 |
+ QList<QByteArray> gtkBasedEnvironments;
|
|
|
8d8a62 |
+ gtkBasedEnvironments << "GNOME"
|
|
|
8d8a62 |
+ << "X-CINNAMON"
|
|
|
8d8a62 |
+ << "UNITY"
|
|
|
8d8a62 |
+ << "MATE"
|
|
|
8d8a62 |
+ << "XFCE"
|
|
|
8d8a62 |
+ << "LXDE";
|
|
|
8d8a62 |
if (desktopEnvironment == QByteArrayLiteral("KDE")) {
|
|
|
8d8a62 |
#if QT_CONFIG(settings)
|
|
|
8d8a62 |
result.push_back(QStringLiteral("kde"));
|
|
|
8d8a62 |
#endif
|
|
|
8d8a62 |
- } else if (!desktopEnvironment.isEmpty() &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("UNKNOWN") &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("GNOME") &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("UNITY") &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("MATE") &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("XFCE") &&
|
|
|
8d8a62 |
- desktopEnvironment != QByteArrayLiteral("LXDE"))
|
|
|
8d8a62 |
+ } else if (gtkBasedEnvironments.contains(desktopEnvironment)) {
|
|
|
8d8a62 |
+ // prefer the GTK3 theme implementation with native dialogs etc.
|
|
|
8d8a62 |
+ result.push_back(QStringLiteral("gtk3"));
|
|
|
8d8a62 |
+ // fallback to the generic Gnome theme if loading the GTK3 theme fails
|
|
|
8d8a62 |
+ result.push_back(QLatin1String(QGnomeTheme::name));
|
|
|
8d8a62 |
+ } else if (!desktopEnvironment.isEmpty() && desktopEnvironment != QByteArrayLiteral("UNKNOWN")) {
|
|
|
8d8a62 |
// Ignore X11 desktop environments
|
|
|
8d8a62 |
result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower()));
|
|
|
8d8a62 |
+ }
|
|
|
8d8a62 |
}
|
|
|
8d8a62 |
|
|
|
8d8a62 |
if (result.isEmpty())
|