parent
4563413d15
commit
e8dc70d0ee
|
@ -1285,6 +1285,11 @@ AddUrl.Title="Add Source via URL"
|
||||||
AddUrl.Text="You have dragged a URL into OBS. This will automatically add the link as a source. Continue?"
|
AddUrl.Text="You have dragged a URL into OBS. This will automatically add the link as a source. Continue?"
|
||||||
AddUrl.Text.Url="URL: %1"
|
AddUrl.Text.Url="URL: %1"
|
||||||
|
|
||||||
|
# Dynamic output size
|
||||||
|
ResizeOutputSizeOfSource="Resize output (source size)"
|
||||||
|
ResizeOutputSizeOfSource.Text="The base and output resolutions will be resized to the size of the current source."
|
||||||
|
ResizeOutputSizeOfSource.Continue="Do you want to continue?"
|
||||||
|
|
||||||
PreviewTransition="Preview Transition"
|
PreviewTransition="Preview Transition"
|
||||||
|
|
||||||
# Import Dialog
|
# Import Dialog
|
||||||
|
|
|
@ -5642,6 +5642,18 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview)
|
||||||
popup.addSeparator();
|
popup.addSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QAction *resizeOutput =
|
||||||
|
popup.addAction(QTStr("ResizeOutputSizeOfSource"), this,
|
||||||
|
SLOT(ResizeOutputSizeOfSource()));
|
||||||
|
|
||||||
|
int width = obs_source_get_width(source);
|
||||||
|
int height = obs_source_get_height(source);
|
||||||
|
|
||||||
|
resizeOutput->setEnabled(!obs_video_active());
|
||||||
|
|
||||||
|
if (width < 8 || height < 8)
|
||||||
|
resizeOutput->setEnabled(false);
|
||||||
|
|
||||||
scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering"));
|
scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering"));
|
||||||
popup.addMenu(
|
popup.addMenu(
|
||||||
AddScaleFilteringMenu(scaleFilteringMenu, sceneItem));
|
AddScaleFilteringMenu(scaleFilteringMenu, sceneItem));
|
||||||
|
@ -9725,6 +9737,40 @@ void OBSBasic::on_actionShowAbout_triggered()
|
||||||
about->setAttribute(Qt::WA_DeleteOnClose, true);
|
about->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OBSBasic::ResizeOutputSizeOfSource()
|
||||||
|
{
|
||||||
|
if (obs_video_active())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QMessageBox resize_output(this);
|
||||||
|
resize_output.setText(QTStr("ResizeOutputSizeOfSource.Text") + "\n\n" +
|
||||||
|
QTStr("ResizeOutputSizeOfSource.Continue"));
|
||||||
|
QAbstractButton *Yes =
|
||||||
|
resize_output.addButton(QTStr("Yes"), QMessageBox::YesRole);
|
||||||
|
resize_output.addButton(QTStr("No"), QMessageBox::NoRole);
|
||||||
|
resize_output.setIcon(QMessageBox::Warning);
|
||||||
|
resize_output.setWindowTitle(QTStr("ResizeOutputSizeOfSource"));
|
||||||
|
resize_output.exec();
|
||||||
|
|
||||||
|
if (resize_output.clickedButton() != Yes)
|
||||||
|
return;
|
||||||
|
|
||||||
|
OBSSource source = obs_sceneitem_get_source(GetCurrentSceneItem());
|
||||||
|
|
||||||
|
int width = obs_source_get_width(source);
|
||||||
|
int height = obs_source_get_height(source);
|
||||||
|
|
||||||
|
config_set_uint(basicConfig, "Video", "BaseCX", width);
|
||||||
|
config_set_uint(basicConfig, "Video", "BaseCY", height);
|
||||||
|
config_set_uint(basicConfig, "Video", "OutputCX", width);
|
||||||
|
config_set_uint(basicConfig, "Video", "OutputCY", height);
|
||||||
|
|
||||||
|
ResetVideo();
|
||||||
|
ResetOutputs();
|
||||||
|
config_save_safe(basicConfig, "tmp", nullptr);
|
||||||
|
on_actionFitToScreen_triggered();
|
||||||
|
}
|
||||||
|
|
||||||
QAction *OBSBasic::AddDockWidget(QDockWidget *dock)
|
QAction *OBSBasic::AddDockWidget(QDockWidget *dock)
|
||||||
{
|
{
|
||||||
QAction *action = ui->menuDocks->addAction(dock->windowTitle());
|
QAction *action = ui->menuDocks->addAction(dock->windowTitle());
|
||||||
|
|
|
@ -1174,6 +1174,8 @@ private slots:
|
||||||
|
|
||||||
void StackedMixerAreaContextMenuRequested();
|
void StackedMixerAreaContextMenuRequested();
|
||||||
|
|
||||||
|
void ResizeOutputSizeOfSource();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void on_actionResetTransform_triggered();
|
void on_actionResetTransform_triggered();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue