UI: Regroup and Reorder source right-click menus

Visually, the Scale Filtering, Blending Mode & Method, and Deinterlacing
menus are now grouped together, with "Hide in Mixer" being its own group
until a better place for it has been found.
Projector and Screenshot menus have been moved down.

As a related code cleanup, the creation of sourceProjector and
sourceWindow has been moved down and partially inlined.
master
gxalpha 2022-05-19 04:09:42 +02:00 committed by Georges Basile Stavracas Neto
parent bb69883bd0
commit 889ca0fc04
1 changed files with 18 additions and 26 deletions

View File

@ -5577,19 +5577,10 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview)
popup.addAction(QTStr("Remove"), this,
SLOT(on_actionRemoveSource_triggered()));
popup.addSeparator();
popup.addMenu(ui->orderMenu);
popup.addMenu(ui->transformMenu);
sourceProjector = new QMenu(QTStr("SourceProjector"));
AddProjectorMenuMonitors(sourceProjector, this,
SLOT(OpenSourceProjector()));
QAction *sourceWindow = popup.addAction(
QTStr("SourceWindow"), this, SLOT(OpenSourceWindow()));
popup.addAction(sourceWindow);
popup.addSeparator();
if (hasAudio) {
@ -5598,37 +5589,38 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview)
SLOT(ToggleHideMixer()));
actionHideMixer->setCheckable(true);
actionHideMixer->setChecked(SourceMixerHidden(source));
}
if (isAsyncVideo) {
deinterlaceMenu = new QMenu(QTStr("Deinterlacing"));
popup.addMenu(
AddDeinterlacingMenu(deinterlaceMenu, source));
popup.addSeparator();
}
scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering"));
popup.addMenu(
AddScaleFilteringMenu(scaleFilteringMenu, sceneItem));
popup.addSeparator();
blendingModeMenu = new QMenu(QTStr("BlendingMode"));
popup.addMenu(AddBlendingModeMenu(blendingModeMenu, sceneItem));
blendingMethodMenu = new QMenu(QTStr("BlendingMethod"));
popup.addMenu(
AddBlendingMethodMenu(blendingMethodMenu, sceneItem));
blendingModeMenu = new QMenu(QTStr("BlendingMode"));
popup.addMenu(AddBlendingModeMenu(blendingModeMenu, sceneItem));
popup.addSeparator();
popup.addMenu(sourceProjector);
popup.addAction(sourceWindow);
popup.addAction(QTStr("Screenshot.Source"), this,
SLOT(ScreenshotSelectedSource()));
if (isAsyncVideo) {
deinterlaceMenu = new QMenu(QTStr("Deinterlacing"));
popup.addMenu(
AddDeinterlacingMenu(deinterlaceMenu, source));
}
popup.addSeparator();
popup.addMenu(CreateVisibilityTransitionMenu(true));
popup.addMenu(CreateVisibilityTransitionMenu(false));
popup.addSeparator();
sourceProjector = new QMenu(QTStr("SourceProjector"));
AddProjectorMenuMonitors(sourceProjector, this,
SLOT(OpenSourceProjector()));
popup.addMenu(sourceProjector);
popup.addAction(QTStr("SourceWindow"), this,
SLOT(OpenSourceWindow()));
popup.addAction(QTStr("Screenshot.Source"), this,
SLOT(ScreenshotSelectedSource()));
popup.addSeparator();
if (flags & OBS_SOURCE_INTERACTION)
popup.addAction(QTStr("Interact"), this,
SLOT(on_actionInteract_triggered()));