Răsfoiți Sursa

UI: Enforce Fusion Qt style on Linux

The Breeze Qt style plugin adds frame arround QDockWidget with QPainter
which can not be modifed. To avoid this the base style is enforce to the
Qt default style on Linux: Fusion.
tytan652 3 ani în urmă
părinte
comite
6d06052c51
1 a modificat fișierele cu 9 adăugiri și 2 ștergeri
  1. 9 2
      UI/obs-app.cpp

+ 9 - 2
UI/obs-app.cpp

@@ -2078,8 +2078,14 @@ static int run_program(fstream &logFile, int argc, char *argv[])
 	}
 #endif
 
-#if !defined(_WIN32) && !defined(__APPLE__) && defined(USE_XDG) && \
-	defined(ENABLE_WAYLAND)
+#if !defined(_WIN32) && !defined(__APPLE__)
+	/* NOTE: The Breeze Qt style plugin adds frame arround QDockWidget with
+	 * QPainter which can not be modifed. To avoid this the base style is
+	 * enforce to the Qt default style on Linux: Fusion. */
+
+	setenv("QT_STYLE_OVERRIDE", "Fusion", false);
+
+#if defined(ENABLE_WAYLAND) && defined(USE_XDG)
 	/* NOTE: Qt doesn't use the Wayland platform on GNOME, so we have to
 	 * force it using the QT_QPA_PLATFORM env var. It's still possible to
 	 * use other QPA platforms using this env var, or the -platform command
@@ -2088,6 +2094,7 @@ static int run_program(fstream &logFile, int argc, char *argv[])
 	const char *session_type = getenv("XDG_SESSION_TYPE");
 	if (session_type && strcmp(session_type, "wayland") == 0)
 		setenv("QT_QPA_PLATFORM", "wayland", false);
+#endif
 #endif
 
 	OBSApp program(argc, argv, profilerNameStore.get());