Skip to content

Commit

Permalink
UI: Standardize spelling of closable, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
notr1ch authored and Lain-B committed Sep 11, 2023
1 parent d8bf21d commit e5472c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions UI/window-basic-stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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),
Expand Down Expand Up @@ -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);

/* --------------------------------------------- */
Expand Down Expand Up @@ -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(); });
Expand Down

0 comments on commit e5472c7

Please sign in to comment.