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.
This commit is contained in:
parent
3752809e88
commit
d51ac98fcf
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user