Warning, /pim/kube/dist/flatpak/patch/qtwayland-use-gnome-platform-theme-on-gnome-based-desktops.patch is written in an unsupported language. File is not indexed.
0001 diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp 0002 index 97e0203c..5bee160a 100644 0003 --- a/src/client/qwaylandintegration.cpp 0004 +++ b/src/client/qwaylandintegration.cpp 0005 @@ -99,20 +99,26 @@ public: 0006 0007 if (QGuiApplication::desktopSettingsAware()) { 0008 const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); 0009 - 0010 + QList<QByteArray> gtkBasedEnvironments; 0011 + gtkBasedEnvironments << "GNOME" 0012 + << "X-CINNAMON" 0013 + << "UNITY" 0014 + << "MATE" 0015 + << "XFCE" 0016 + << "LXDE"; 0017 if (desktopEnvironment == QByteArrayLiteral("KDE")) { 0018 #if QT_CONFIG(settings) 0019 result.push_back(QStringLiteral("kde")); 0020 #endif 0021 - } else if (!desktopEnvironment.isEmpty() && 0022 - desktopEnvironment != QByteArrayLiteral("UNKNOWN") && 0023 - desktopEnvironment != QByteArrayLiteral("GNOME") && 0024 - desktopEnvironment != QByteArrayLiteral("UNITY") && 0025 - desktopEnvironment != QByteArrayLiteral("MATE") && 0026 - desktopEnvironment != QByteArrayLiteral("XFCE") && 0027 - desktopEnvironment != QByteArrayLiteral("LXDE")) 0028 + } else if (gtkBasedEnvironments.contains(desktopEnvironment)) { 0029 + // prefer the GTK3 theme implementation with native dialogs etc. 0030 + result.push_back(QStringLiteral("gtk3")); 0031 + // fallback to the generic Gnome theme if loading the GTK3 theme fails 0032 + result.push_back(QLatin1String(QGnomeTheme::name)); 0033 + } else if (!desktopEnvironment.isEmpty() && desktopEnvironment != QByteArrayLiteral("UNKNOWN")) { 0034 // Ignore X11 desktop environments 0035 result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower())); 0036 + } 0037 } 0038 0039 if (result.isEmpty())