|
|
@@ -1436,6 +1436,35 @@ void OBSPropertiesView::AddProperty(obs_property_t *property,
|
|
|
if (!widget)
|
|
|
return;
|
|
|
|
|
|
+ if (obs_property_long_description(property)) {
|
|
|
+ QString lStr = "<html>%1 <img src='%2' style=' \
|
|
|
+ vertical-align: bottom; \
|
|
|
+ ' /></html>";
|
|
|
+ bool lightTheme = palette().text().color().redF() < 0.5;
|
|
|
+ QString file = lightTheme ? ":/res/images/help.svg"
|
|
|
+ : ":/res/images/help_light.svg";
|
|
|
+ if (label) {
|
|
|
+ label->setText(lStr.arg(label->text(), file));
|
|
|
+ label->setToolTip(
|
|
|
+ obs_property_long_description(property));
|
|
|
+ } else if (type == OBS_PROPERTY_BOOL) {
|
|
|
+ QWidget *newWidget = new QWidget();
|
|
|
+ QHBoxLayout *boxLayout = new QHBoxLayout(newWidget);
|
|
|
+ boxLayout->setContentsMargins(0, 0, 0, 0);
|
|
|
+ boxLayout->setAlignment(Qt::AlignLeft);
|
|
|
+
|
|
|
+ QCheckBox *check = qobject_cast<QCheckBox *>(widget);
|
|
|
+ QLabel *help =
|
|
|
+ new QLabel(lStr.arg(check->text(), file));
|
|
|
+ help->setToolTip(
|
|
|
+ obs_property_long_description(property));
|
|
|
+ check->setText("");
|
|
|
+ boxLayout->addWidget(check);
|
|
|
+ boxLayout->addWidget(help);
|
|
|
+ widget = newWidget;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
layout->addRow(label, widget);
|
|
|
|
|
|
if (!lastFocused.empty())
|