UI: Standardize spelling of closable, fix typo

This commit is contained in:
Richard Stanway
2023-09-11 09:56:27 -07:00
committed by Lain
parent d8bf21de2f
commit e5472c775c
+5 -5
View File
@@ -31,7 +31,7 @@ void OBSBasicStats::OBSFrontendEvent(enum obs_frontend_event event, void *ptr)
break; break;
case OBS_FRONTEND_EVENT_EXIT: case OBS_FRONTEND_EVENT_EXIT:
// This is only reached when the non-closable (dock) stats // This is only reached when the non-closable (dock) stats
// window is being cleaned up. Thee closable stats window is // window is being cleaned up. The closable stats window is
// already gone by this point as it's deleted on close. // already gone by this point as it's deleted on close.
obs_frontend_remove_event_callback(OBSFrontendEvent, stats); obs_frontend_remove_event_callback(OBSFrontendEvent, stats);
break; break;
@@ -55,7 +55,7 @@ static QString MakeMissedFramesText(uint32_t total_lagged,
QString::number(num, 'f', 1)); QString::number(num, 'f', 1));
} }
OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable) OBSBasicStats::OBSBasicStats(QWidget *parent, bool closable)
: QFrame(parent), : QFrame(parent),
cpu_info(os_cpu_usage_info_start()), cpu_info(os_cpu_usage_info_start()),
timer(this), timer(this),
@@ -115,13 +115,13 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
/* --------------------------------------------- */ /* --------------------------------------------- */
QPushButton *closeButton = nullptr; QPushButton *closeButton = nullptr;
if (closeable) if (closable)
closeButton = new QPushButton(QTStr("Close")); closeButton = new QPushButton(QTStr("Close"));
QPushButton *resetButton = new QPushButton(QTStr("Reset")); QPushButton *resetButton = new QPushButton(QTStr("Reset"));
QHBoxLayout *buttonLayout = new QHBoxLayout; QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch(); buttonLayout->addStretch();
buttonLayout->addWidget(resetButton); buttonLayout->addWidget(resetButton);
if (closeable) if (closable)
buttonLayout->addWidget(closeButton); buttonLayout->addWidget(closeButton);
/* --------------------------------------------- */ /* --------------------------------------------- */
@@ -165,7 +165,7 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
setLayout(mainLayout); setLayout(mainLayout);
/* --------------------------------------------- */ /* --------------------------------------------- */
if (closeable) if (closable)
connect(closeButton, &QPushButton::clicked, connect(closeButton, &QPushButton::clicked,
[this]() { close(); }); [this]() { close(); });
connect(resetButton, &QPushButton::clicked, [this]() { Reset(); }); connect(resetButton, &QPushButton::clicked, [this]() { Reset(); });