2019-07-07 15:47:29 -07:00
|
|
|
#include "record-button.hpp"
|
|
|
|
#include "window-basic-main.hpp"
|
|
|
|
|
|
|
|
void RecordButton::resizeEvent(QResizeEvent *event)
|
|
|
|
{
|
|
|
|
OBSBasic *main = OBSBasic::Get();
|
|
|
|
if (!main->pause)
|
|
|
|
return;
|
|
|
|
|
|
|
|
QSize pauseSize = main->pause->size();
|
|
|
|
int height = main->ui->recordButton->size().height();
|
|
|
|
|
|
|
|
if (pauseSize.height() != height || pauseSize.width() != height) {
|
|
|
|
main->pause->setMinimumSize(height, height);
|
|
|
|
main->pause->setMaximumSize(height, height);
|
|
|
|
}
|
2019-07-15 04:50:23 -07:00
|
|
|
|
|
|
|
event->accept();
|
2019-07-07 15:47:29 -07:00
|
|
|
}
|
2019-12-12 17:07:26 -08:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|