UI: Replace themeID and style hints with class property

This commit is contained in:
Warchamp7
2024-08-30 11:55:23 -04:00
committed by Ryan Foster
parent 71775e3619
commit cb026964b0
33 changed files with 595 additions and 657 deletions

View File

@@ -5266,8 +5266,9 @@ void OBSBasicSettings::AdvOutRecCheckWarnings()
if (!errorMsg.isEmpty() || !warningMsg.isEmpty()) {
advOutRecWarning = new QLabel(
errorMsg.isEmpty() ? warningMsg : errorMsg, this);
advOutRecWarning->setObjectName(
errorMsg.isEmpty() ? "warningLabel" : "errorLabel");
advOutRecWarning->setProperty("class", errorMsg.isEmpty()
? "text-warning"
: "text-danger");
advOutRecWarning->setWordWrap(true);
ui->advOutRecInfoLayout->addWidget(advOutRecWarning);
@@ -5667,7 +5668,8 @@ void OBSBasicSettings::SimpleReplayBufferChanged()
QTStr(ESTIMATE_TOO_LARGE_STR)
.arg(QString::number(int(memMB)),
QString::number(int(memMaxMB))));
ui->simpleRBEstimate->setObjectName("warningLabel");
ui->simpleRBEstimate->setProperty("class",
"text-warning");
}
} else {
ui->simpleRBEstimate->setText(QTStr(ESTIMATE_UNKNOWN_STR));
@@ -5769,7 +5771,7 @@ void OBSBasicSettings::AdvReplayBufferChanged()
QTStr(ESTIMATE_TOO_LARGE_STR)
.arg(QString::number(int(memMB)),
QString::number(int(memMaxMB))));
ui->advRBEstimate->setObjectName("warningLabel");
ui->advRBEstimate->setProperty("class", "text-warning");
}
} else {
ui->advRBMegsMax->setVisible(true);
@@ -6001,7 +6003,7 @@ void OBSBasicSettings::SimpleRecordingEncoderChanged()
return;
simpleOutRecWarning = new QLabel(warning, this);
simpleOutRecWarning->setObjectName("warningLabel");
simpleOutRecWarning->setProperty("class", "text-warning");
simpleOutRecWarning->setWordWrap(true);
ui->simpleOutInfoLayout->addWidget(simpleOutRecWarning);
}