From a7503254f3a0d7f48239a66414f3e3aca0d7c6a9 Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Tue, 9 Aug 2022 22:39:26 +1000 Subject: [PATCH] Revert "UI: Apply default stylesheet before applying theme" This reverts commit 08cee21158c1f43956210418dd99ab763a90d2a2. Turns out that while this did improve theme switching performance, it also completely breaks styling on macOS and introduces visual quirks on Windows after switching themes, such as sliders and dropdown contents. # Conflicts: # UI/obs-app.cpp # UI/obs-app.hpp --- UI/obs-app.cpp | 2 -- UI/obs-app.hpp | 1 - 2 files changed, 3 deletions(-) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 91a7196f8..fb7a5f715 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1189,7 +1189,6 @@ std::string OBSApp::SetParentTheme(std::string name) if (path.empty()) return path; - setStyleSheet(defaultStyleSheet); setPalette(defaultPalette); QString mpath = QString("file:///") + path.c_str(); @@ -1238,7 +1237,6 @@ bool OBSApp::SetTheme(std::string name, std::string path) bool OBSApp::InitTheme() { defaultPalette = palette(); - defaultStyleSheet = styleSheet(); const char *themeName = config_get_string(globalConfig, "General", "CurrentTheme3"); diff --git a/UI/obs-app.hpp b/UI/obs-app.hpp index 88ff508d5..df75bec92 100644 --- a/UI/obs-app.hpp +++ b/UI/obs-app.hpp @@ -80,7 +80,6 @@ class OBSApp : public QApplication { private: std::string locale; std::string theme; - QString defaultStyleSheet; OBSThemeMeta *themeMeta = nullptr; bool themeDarkMode = true; ConfigFile globalConfig;