File mate-session-manager-qt-5.7-styleoverride.patch of Package mate-session-manager
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,19 @@ AM_CONDITIONAL(HAVE_ELOGIND, [test "x$us
AC_SUBST(HAVE_ELOGIND)
dnl ====================================================================
+dnl Check for Qt 5.7+ to set correct env var for theme/styling
+dnl ====================================================================
+AC_DEFINE([HAVE_QT57], [0], [Have Qt 5.7+])
+AC_ARG_ENABLE(qt57_theme_support,
+ AS_HELP_STRING([--enable-qt57-theme-support], [Support GTK+ styles for Qt apps with Qt 5.7+]),
+ [enable_qt57_theme_support=yes],
+ [enable_qt57_theme_support=no])
+
+if test x$enable_qt57_theme_support = xyes; then
+ AC_DEFINE([HAVE_QT57], [1])
+fi
+
+dnl ====================================================================
dnl Check for XSync extension
dnl ====================================================================
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -652,6 +652,21 @@ int main(int argc, char** argv)
*/
gsm_util_setenv("MATE_DESKTOP_SESSION_ID", "this-is-deprecated");
+ /* Make Qt5 apps follow the GTK+ style */
+ if (!HAVE_QT57 && g_getenv("QT_STYLE_OVERRIDE") == NULL)
+ {
+ gsm_util_setenv("QT_STYLE_OVERRIDE", "gtk");
+ }
+ else if (HAVE_QT57 && g_getenv("QT_STYLE_OVERRIDE") != NULL)
+ {
+ g_unsetenv("QT_STYLE_OVERRIDE");
+ }
+
+ if (HAVE_QT57 && g_getenv("QT_QPA_PLATFORMTHEME") == NULL)
+ {
+ gsm_util_setenv("QT_QPA_PLATFORMTHEME", "gtk2");
+ }
+
/*
* Make sure gsettings is set up correctly. If not, then bail.
*/