New upstream version 25.0.3+dfsg1
This commit is contained in:
parent
04fe0efc67
commit
8b2e5f2130
569 changed files with 62491 additions and 5875 deletions
|
|
@ -235,10 +235,21 @@ QWidget *OBSPropertiesView::AddText(obs_property_t *prop, QFormLayout *layout,
|
|||
{
|
||||
const char *name = obs_property_name(prop);
|
||||
const char *val = obs_data_get_string(settings, name);
|
||||
const bool monospace = obs_property_text_monospace(prop);
|
||||
obs_text_type type = obs_property_text_type(prop);
|
||||
|
||||
if (type == OBS_TEXT_MULTILINE) {
|
||||
QPlainTextEdit *edit = new QPlainTextEdit(QT_UTF8(val));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
edit->setTabStopDistance(40);
|
||||
#else
|
||||
edit->setTabStopWidth(40);
|
||||
#endif
|
||||
if (monospace) {
|
||||
QFont f("Courier");
|
||||
f.setStyleHint(QFont::Monospace);
|
||||
edit->setFont(f);
|
||||
}
|
||||
return NewWidget(prop, edit, SIGNAL(textChanged()));
|
||||
|
||||
} else if (type == OBS_TEXT_PASSWORD) {
|
||||
|
|
@ -577,10 +588,9 @@ void OBSPropertiesView::AddEditableList(obs_property_t *prop,
|
|||
for (size_t i = 0; i < count; i++) {
|
||||
obs_data_t *item = obs_data_array_item(array, i);
|
||||
list->addItem(QT_UTF8(obs_data_get_string(item, "value")));
|
||||
list->setItemSelected(list->item((int)i),
|
||||
obs_data_get_bool(item, "selected"));
|
||||
list->setItemHidden(list->item((int)i),
|
||||
obs_data_get_bool(item, "hidden"));
|
||||
QListWidgetItem *const list_item = list->item((int)i);
|
||||
list_item->setSelected(obs_data_get_bool(item, "selected"));
|
||||
list_item->setHidden(obs_data_get_bool(item, "hidden"));
|
||||
obs_data_release(item);
|
||||
}
|
||||
|
||||
|
|
@ -1426,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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue