UI: Enable load of stylesheet.qss from config dir
This will allow obs to load stylesheet.qss (Qt stylesheet). It enables users to theme obs how they please within Qt stylesheet guidelines. A default stylesheet is not yet available.
This commit is contained in:
@@ -81,6 +81,15 @@ OBSBasic::OBSBasic(QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
char styleSheetPath[512];
|
||||
int ret = os_get_config_path(styleSheetPath, sizeof(styleSheetPath),
|
||||
"obs-studio/basic/stylesheet.qss");
|
||||
if (ret > 0) {
|
||||
QFile styleSheet(QT_UTF8(styleSheetPath));
|
||||
if (styleSheet.open(QFile::ReadOnly))
|
||||
setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
qRegisterMetaType<OBSScene> ("OBSScene");
|
||||
qRegisterMetaType<OBSSceneItem>("OBSSceneItem");
|
||||
qRegisterMetaType<OBSSource> ("OBSSource");
|
||||
|
Reference in New Issue
Block a user