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"
|
Right="Right"
|
||||||
Top="Top"
|
Top="Top"
|
||||||
Bottom="Bottom"
|
Bottom="Bottom"
|
||||||
|
Reset="Reset"
|
||||||
|
|
||||||
# quick transitions
|
# quick transitions
|
||||||
QuickTransitions.SwapScenes="Swap Preview/Output Scenes After Transitioning"
|
QuickTransitions.SwapScenes="Swap Preview/Output Scenes After Transitioning"
|
||||||
|
@ -638,6 +638,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Reset|QDialogButtonBox::Close</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -462,7 +462,6 @@ private slots:
|
|||||||
void on_actionCheckForUpdates_triggered();
|
void on_actionCheckForUpdates_triggered();
|
||||||
|
|
||||||
void on_actionEditTransform_triggered();
|
void on_actionEditTransform_triggered();
|
||||||
void on_actionResetTransform_triggered();
|
|
||||||
void on_actionRotate90CW_triggered();
|
void on_actionRotate90CW_triggered();
|
||||||
void on_actionRotate90CCW_triggered();
|
void on_actionRotate90CCW_triggered();
|
||||||
void on_actionRotate180_triggered();
|
void on_actionRotate180_triggered();
|
||||||
@ -564,6 +563,9 @@ private slots:
|
|||||||
void OpenSourceProjector();
|
void OpenSourceProjector();
|
||||||
void OpenSceneProjector();
|
void OpenSceneProjector();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void on_actionResetTransform_triggered();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OBSBasic(QWidget *parent = 0);
|
explicit OBSBasic(QWidget *parent = 0);
|
||||||
virtual ~OBSBasic();
|
virtual ~OBSBasic();
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <QMessageBox>
|
||||||
#include "window-basic-transform.hpp"
|
#include "window-basic-transform.hpp"
|
||||||
#include "window-basic-main.hpp"
|
#include "window-basic-main.hpp"
|
||||||
|
|
||||||
@ -55,6 +56,11 @@ OBSBasicTransform::OBSBasicTransform(OBSBasic *parent)
|
|||||||
HookWidget(ui->cropTop, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
HookWidget(ui->cropTop, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
||||||
HookWidget(ui->cropBottom, 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());
|
installEventFilter(CreateShortcutFilter());
|
||||||
|
|
||||||
OBSScene curScene = main->GetCurrentScene();
|
OBSScene curScene = main->GetCurrentScene();
|
||||||
@ -288,3 +294,8 @@ void OBSBasicTransform::OnCropChanged()
|
|||||||
obs_sceneitem_set_crop(item, &crop);
|
obs_sceneitem_set_crop(item, &crop);
|
||||||
ignoreTransformSignal = false;
|
ignoreTransformSignal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OBSBasicTransform::on_resetButton_clicked()
|
||||||
|
{
|
||||||
|
main->on_actionResetTransform_triggered();
|
||||||
|
}
|
||||||
|
@ -42,6 +42,7 @@ private slots:
|
|||||||
void OnBoundsType(int index);
|
void OnBoundsType(int index);
|
||||||
void OnControlChanged();
|
void OnControlChanged();
|
||||||
void OnCropChanged();
|
void OnCropChanged();
|
||||||
|
void on_resetButton_clicked();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OBSBasicTransform(OBSBasic *parent);
|
OBSBasicTransform(OBSBasic *parent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user