Use Gnome platform theme on Gnome wayland sessions
This commit is contained in:
parent
0bdf10fc36
commit
c984e6a1f9
@ -3,7 +3,7 @@
|
|||||||
Summary: Qt5 - Wayland platform support and QtCompositor module
|
Summary: Qt5 - Wayland platform support and QtCompositor module
|
||||||
Name: qt5-%{qt_module}
|
Name: qt5-%{qt_module}
|
||||||
Version: 5.12.4
|
Version: 5.12.4
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
License: LGPLv3
|
License: LGPLv3
|
||||||
Url: http://www.qt.io
|
Url: http://www.qt.io
|
||||||
@ -19,12 +19,17 @@ Patch4: qtwayland-make-handleupdate-aware-of-exposure-changes.patch
|
|||||||
Patch5: qtwayland-dont-crash-when-start-drag-without-dragfocus.patch
|
Patch5: qtwayland-dont-crash-when-start-drag-without-dragfocus.patch
|
||||||
Patch6: qtwayland-fix-expose-event-compression.patch
|
Patch6: qtwayland-fix-expose-event-compression.patch
|
||||||
|
|
||||||
|
# Upstreamable patches
|
||||||
|
# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1732129
|
||||||
|
Patch50: qtwayland-use-gnome-platform-theme-on-gnome-based-desktops.patch
|
||||||
|
|
||||||
# filter qml provides
|
# filter qml provides
|
||||||
%global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$
|
%global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$
|
||||||
|
|
||||||
BuildRequires: qt5-qtbase-devel >= %{version}
|
BuildRequires: qt5-qtbase-devel >= %{version}
|
||||||
BuildRequires: qt5-qtbase-static
|
BuildRequires: qt5-qtbase-static
|
||||||
BuildRequires: qt5-qtbase-private-devel
|
BuildRequires: qt5-qtbase-private-devel
|
||||||
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
|
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
|
||||||
BuildRequires: qt5-qtdeclarative-devel
|
BuildRequires: qt5-qtdeclarative-devel
|
||||||
|
|
||||||
@ -121,6 +126,10 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 23 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.3-5
|
||||||
|
- Use Gnome platform theme on Gnome Wayland sessions
|
||||||
|
Resolves: bz#1732129
|
||||||
|
|
||||||
* Thu Jul 11 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-4
|
* Thu Jul 11 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-4
|
||||||
- Pull in upstream fixes
|
- Pull in upstream fixes
|
||||||
- Disable patch which is not needed anymore because of qtbase change
|
- Disable patch which is not needed anymore because of qtbase change
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
|
||||||
|
index 97e0203c..5bee160a 100644
|
||||||
|
--- a/src/client/qwaylandintegration.cpp
|
||||||
|
+++ b/src/client/qwaylandintegration.cpp
|
||||||
|
@@ -99,20 +99,26 @@ public:
|
||||||
|
|
||||||
|
if (QGuiApplication::desktopSettingsAware()) {
|
||||||
|
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
|
||||||
|
-
|
||||||
|
+ QList<QByteArray> gtkBasedEnvironments;
|
||||||
|
+ gtkBasedEnvironments << "GNOME"
|
||||||
|
+ << "X-CINNAMON"
|
||||||
|
+ << "UNITY"
|
||||||
|
+ << "MATE"
|
||||||
|
+ << "XFCE"
|
||||||
|
+ << "LXDE";
|
||||||
|
if (desktopEnvironment == QByteArrayLiteral("KDE")) {
|
||||||
|
#if QT_CONFIG(settings)
|
||||||
|
result.push_back(QStringLiteral("kde"));
|
||||||
|
#endif
|
||||||
|
- } else if (!desktopEnvironment.isEmpty() &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("UNKNOWN") &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("GNOME") &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("UNITY") &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("MATE") &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("XFCE") &&
|
||||||
|
- desktopEnvironment != QByteArrayLiteral("LXDE"))
|
||||||
|
+ } else if (gtkBasedEnvironments.contains(desktopEnvironment)) {
|
||||||
|
+ // prefer the GTK3 theme implementation with native dialogs etc.
|
||||||
|
+ result.push_back(QStringLiteral("gtk3"));
|
||||||
|
+ // fallback to the generic Gnome theme if loading the GTK3 theme fails
|
||||||
|
+ result.push_back(QLatin1String(QGnomeTheme::name));
|
||||||
|
+ } else if (!desktopEnvironment.isEmpty() && desktopEnvironment != QByteArrayLiteral("UNKNOWN")) {
|
||||||
|
// Ignore X11 desktop environments
|
||||||
|
result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower()));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.isEmpty())
|
Loading…
Reference in New Issue
Block a user