UI: Make close button default in transform dialog

Improves ease of use.

Closes jp9000/obs-studio#731
This commit is contained in:
SuslikV 2016-12-16 19:38:46 +02:00 committed by jp9000
parent 0ff4feab02
commit ee019c7761
2 changed files with 10 additions and 3 deletions

View file

@ -648,5 +648,12 @@
</layout>
</widget>
<resources/>
<connections/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>OBSBasicTransform</receiver>
<slot>reject()</slot>
</connection>
</connections>
</ui>

View file

@ -56,10 +56,10 @@ OBSBasicTransform::OBSBasicTransform(OBSBasic *parent)
HookWidget(ui->cropTop, ISCROLL_CHANGED, SLOT(OnCropChanged()));
HookWidget(ui->cropBottom, ISCROLL_CHANGED, SLOT(OnCropChanged()));
ui->buttonBox->button(QDialogButtonBox::Close)->setDefault(true);
connect(ui->buttonBox->button(QDialogButtonBox::Reset),
SIGNAL(clicked()), this, SLOT(on_resetButton_clicked()));
connect(ui->buttonBox,
SIGNAL(rejected()), this, SLOT(close()));
installEventFilter(CreateShortcutFilter());