From 889ca0fc041dbd35de15e99088407b5da488393a Mon Sep 17 00:00:00 2001 From: gxalpha Date: Thu, 19 May 2022 04:09:42 +0200 Subject: [PATCH] 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. --- UI/window-basic-main.cpp | 44 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index e158f5ab6..5e993ddd8 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -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()));