UI: Add reset/close buttons to transform dialog
Adds a reset and close button to the transform dialog. Closes jp9000/obs-studio#612
This commit is contained in:
parent
3b3933b42f
commit
883f9f204b
@ -53,6 +53,7 @@ Left="Left"
|
||||
Right="Right"
|
||||
Top="Top"
|
||||
Bottom="Bottom"
|
||||
Reset="Reset"
|
||||
|
||||
# quick transitions
|
||||
QuickTransitions.SwapScenes="Swap Preview/Output Scenes After Transitioning"
|
||||
|
@ -638,6 +638,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Reset|QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -462,7 +462,6 @@ private slots:
|
||||
void on_actionCheckForUpdates_triggered();
|
||||
|
||||
void on_actionEditTransform_triggered();
|
||||
void on_actionResetTransform_triggered();
|
||||
void on_actionRotate90CW_triggered();
|
||||
void on_actionRotate90CCW_triggered();
|
||||
void on_actionRotate180_triggered();
|
||||
@ -564,6 +563,9 @@ private slots:
|
||||
void OpenSourceProjector();
|
||||
void OpenSceneProjector();
|
||||
|
||||
public slots:
|
||||
void on_actionResetTransform_triggered();
|
||||
|
||||
public:
|
||||
explicit OBSBasic(QWidget *parent = 0);
|
||||
virtual ~OBSBasic();
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <QMessageBox>
|
||||
#include "window-basic-transform.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
|
||||
@ -55,6 +56,11 @@ OBSBasicTransform::OBSBasicTransform(OBSBasic *parent)
|
||||
HookWidget(ui->cropTop, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
||||
HookWidget(ui->cropBottom, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset),
|
||||
SIGNAL(clicked()), this, SLOT(on_resetButton_clicked()));
|
||||
connect(ui->buttonBox,
|
||||
SIGNAL(rejected()), this, SLOT(close()));
|
||||
|
||||
installEventFilter(CreateShortcutFilter());
|
||||
|
||||
OBSScene curScene = main->GetCurrentScene();
|
||||
@ -288,3 +294,8 @@ void OBSBasicTransform::OnCropChanged()
|
||||
obs_sceneitem_set_crop(item, &crop);
|
||||
ignoreTransformSignal = false;
|
||||
}
|
||||
|
||||
void OBSBasicTransform::on_resetButton_clicked()
|
||||
{
|
||||
main->on_actionResetTransform_triggered();
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ private slots:
|
||||
void OnBoundsType(int index);
|
||||
void OnControlChanged();
|
||||
void OnCropChanged();
|
||||
void on_resetButton_clicked();
|
||||
|
||||
public:
|
||||
OBSBasicTransform(OBSBasic *parent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user