Просмотр исходного кода

UI: Reintroduce faster theme switching

Based on (was reverted):
https://github.com/obsproject/obs-studio/commit/08cee21158c1f43956210418dd99ab763a90d2a2

This simplifies the faster switching code, as setting an empty
stylesheet resets it to default.
cg2121 3 лет назад
Родитель
Сommit
ccfe300f72
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      UI/obs-app.cpp

+ 2 - 0
UI/obs-app.cpp

@@ -1205,6 +1205,8 @@ bool OBSApp::SetTheme(std::string name, std::string path)
 	path = GetTheme(name, path);
 	path = GetTheme(name, path);
 	if (path.empty())
 	if (path.empty())
 		return false;
 		return false;
+
+	setStyleSheet("");
 	unique_ptr<OBSThemeMeta> themeMeta;
 	unique_ptr<OBSThemeMeta> themeMeta;
 	themeMeta.reset(ParseThemeMeta(path.c_str()));
 	themeMeta.reset(ParseThemeMeta(path.c_str()));
 	string parentPath;
 	string parentPath;