From 6d06052c51ba453b4c75a655597c97f9f55ad134 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Mon, 27 Jun 2022 18:34:33 +0200 Subject: [PATCH] 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. --- UI/obs-app.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index d292705cc..c3fdcc006 100644 --- a/UI/obs-app.cpp +++ b/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());