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
This commit is contained in:
Matt Gajownik 2022-08-09 22:39:26 +10:00
parent 3c6c44e1fe
commit a7503254f3
2 changed files with 0 additions and 3 deletions

View File

@ -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");

View File

@ -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;