From d51ac98fcf9aa676664caeca35dc38137887939e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 24 Jun 2020 09:22:58 -0700 Subject: [PATCH] UI: Fix pause/replay buttons having large width Depending on the circumstances, these buttons can start with width values that are much larger than their height, and that value wouldn't be corrected immediately. Setting an explicit policy to lock their width to the same as their height value enforces the behavior that was intended from the beginning. --- UI/window-basic-main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 0e0d5b795..bae27e7c8 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -7845,6 +7845,11 @@ void OBSBasic::UpdatePause(bool activate) pause->setChecked(false); pause->setProperty("themeID", QVariant(QStringLiteral("pauseIconSmall"))); + + QSizePolicy sp; + sp.setHeightForWidth(true); + pause->setSizePolicy(sp); + connect(pause.data(), &QAbstractButton::clicked, this, &OBSBasic::PauseToggled); ui->recordingLayout->addWidget(pause.data()); @@ -7868,6 +7873,11 @@ void OBSBasic::UpdateReplayBuffer(bool activate) replay->setChecked(false); replay->setProperty("themeID", QVariant(QStringLiteral("replayIconSmall"))); + + QSizePolicy sp; + sp.setHeightForWidth(true); + replay->setSizePolicy(sp); + connect(replay.data(), &QAbstractButton::clicked, this, &OBSBasic::ReplayBufferSave); replayLayout->addWidget(replay.data());