mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-18 19:24:42 -04:00
UI: Add save button next to replay buffer button
Allows the ability to save replays with a button rather than with the keyboard if desired. Closes obsproject/obs-studio#1954
This commit is contained in:
@@ -17,3 +17,20 @@ void RecordButton::resizeEvent(QResizeEvent *event)
|
||||
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void ReplayBufferButton::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
OBSBasic *main = OBSBasic::Get();
|
||||
if (!main->replay)
|
||||
return;
|
||||
|
||||
QSize replaySize = main->replay->size();
|
||||
int height = main->ui->recordButton->size().height();
|
||||
|
||||
if (replaySize.height() != height || replaySize.width() != height) {
|
||||
main->replay->setMinimumSize(height, height);
|
||||
main->replay->setMaximumSize(height, height);
|
||||
}
|
||||
|
||||
event->accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user