UI: Only set QStyle on app start
Setting a QStyle resets the color palette. This is unhelpful when a few lines before that we set a new palette. In theory the setStyle call could just be moved up, but we don't need to since we always set the same style so there's no reason to call it multiple times.
This commit is contained in:
parent
b4a2eacba7
commit
0a94b3ce16
@ -1222,7 +1222,6 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
||||
|
||||
QString mpath = QString("file:///") + lpath.c_str();
|
||||
ParseExtraThemeData(path.c_str());
|
||||
setStyle(new OBSIgnoreWheelProxyStyle);
|
||||
setStyleSheet(mpath);
|
||||
if (themeMeta) {
|
||||
themeDarkMode = themeMeta->dark;
|
||||
@ -1238,6 +1237,7 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
||||
bool OBSApp::InitTheme()
|
||||
{
|
||||
defaultPalette = palette();
|
||||
setStyle(new OBSIgnoreWheelProxyStyle());
|
||||
|
||||
const char *themeName =
|
||||
config_get_string(globalConfig, "General", "CurrentTheme3");
|
||||
|
Loading…
x
Reference in New Issue
Block a user