UI: Standardize spelling of closable, fix typo

This commit is contained in:
Richard Stanway
2023-09-11 18:24:31 +02:00
committed by Lain
parent d8bf21de2f
commit e5472c775c

View File

@@ -31,7 +31,7 @@ void OBSBasicStats::OBSFrontendEvent(enum obs_frontend_event event, void *ptr)
break;
case OBS_FRONTEND_EVENT_EXIT:
// 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.
obs_frontend_remove_event_callback(OBSFrontendEvent, stats);
break;
@@ -55,7 +55,7 @@ static QString MakeMissedFramesText(uint32_t total_lagged,
QString::number(num, 'f', 1));
}
OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
OBSBasicStats::OBSBasicStats(QWidget *parent, bool closable)
: QFrame(parent),
cpu_info(os_cpu_usage_info_start()),
timer(this),
@@ -115,13 +115,13 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
/* --------------------------------------------- */
QPushButton *closeButton = nullptr;
if (closeable)
if (closable)
closeButton = new QPushButton(QTStr("Close"));
QPushButton *resetButton = new QPushButton(QTStr("Reset"));
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch();
buttonLayout->addWidget(resetButton);
if (closeable)
if (closable)
buttonLayout->addWidget(closeButton);
/* --------------------------------------------- */
@@ -165,7 +165,7 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
setLayout(mainLayout);
/* --------------------------------------------- */
if (closeable)
if (closable)
connect(closeButton, &QPushButton::clicked,
[this]() { close(); });
connect(resetButton, &QPushButton::clicked, [this]() { Reset(); });