libobs/UI: Support monospace font in multiline text property
This commit is contained in:
@@ -235,6 +235,7 @@ 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) {
|
||||
@@ -244,6 +245,11 @@ QWidget *OBSPropertiesView::AddText(obs_property_t *prop, QFormLayout *layout,
|
||||
#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) {
|
||||
|
Reference in New Issue
Block a user