diff --git a/src/app/mainview/components/CallActionBar.qml b/src/app/mainview/components/CallActionBar.qml index 4d665c64b32cd340d096fcdf0cf5820f0bf84263..a4d520407d481f44f0eade5f01835a2d2340ef00 100644 --- a/src/app/mainview/components/CallActionBar.qml +++ b/src/app/mainview/components/CallActionBar.qml @@ -188,10 +188,6 @@ Control { UtilsAdapter.setAppValue(Settings.HideSpectators, !layoutModel.get(index).ActiveSetting) CurrentCall.hideSpectators = UtilsAdapter.getAppValue(Settings.HideSpectators) break - case JamiStrings.mirrorLocalVideo: - UtilsAdapter.setAppValue(Settings.FlipSelf, !layoutModel.get(index).ActiveSetting) - CurrentCall.flipSelf = UtilsAdapter.getAppValue(Settings.FlipSelf) - break } } onTriggered: { @@ -226,13 +222,6 @@ Control { "SectionEnd": false}) } - layoutModel.append({"Name": JamiStrings.mirrorLocalVideo, - "IconSource": JamiResources.flip_24dp_svg, - "ActiveSetting": UtilsAdapter.getAppValue(Settings.FlipSelf), - "TopMargin": !CurrentCall.isConference, - "BottomMargin": true, - "SectionEnd": true}) - layoutModel.append({"Name": JamiStrings.viewFullScreen, "IconSource": JamiResources.open_in_full_24dp_svg, "ActiveSetting": layoutManager.isCallFullscreen, diff --git a/src/app/mainview/components/CallOverlay.qml b/src/app/mainview/components/CallOverlay.qml index 67473c22dd227a9f6f48b330a244688737fafe63..a5fcff6c62bd273d62c7ec98c58d5756f9e36528 100644 --- a/src/app/mainview/components/CallOverlay.qml +++ b/src/app/mainview/components/CallOverlay.qml @@ -55,13 +55,15 @@ Item { function openCallViewContextMenuInPos(x, y, hoveredOverlayUri, hoveredOverlaySinkId, - hoveredOverVideoMuted) + hoveredOverVideoMuted, + isOnLocal) { callViewContextMenu.x = root.width - x >= callViewContextMenu.width ? x : root.width - callViewContextMenu.width callViewContextMenu.y = root.height - y >= callViewContextMenu.height ? y : root.height - callViewContextMenu.height callViewContextMenu.hoveredOverlayUri = hoveredOverlayUri callViewContextMenu.hoveredOverlaySinkId = hoveredOverlaySinkId callViewContextMenu.hoveredOverVideoMuted = hoveredOverVideoMuted + callViewContextMenu.isOnLocal = isOnLocal callViewContextMenu.open() } diff --git a/src/app/mainview/components/CallViewContextMenu.qml b/src/app/mainview/components/CallViewContextMenu.qml index 91611dad6a60af93c9959e105c2440eec71c2d0d..cb539f3c1efd91fcaac081bf1d138d59a42fdb0d 100644 --- a/src/app/mainview/components/CallViewContextMenu.qml +++ b/src/app/mainview/components/CallViewContextMenu.qml @@ -22,9 +22,10 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -import net.jami.Models 1.1 import net.jami.Adapters 1.1 import net.jami.Constants 1.1 +import net.jami.Models 1.1 +import net.jami.Enums 1.1 import "../../commoncomponents" import "../../commoncomponents/contextmenu" @@ -39,6 +40,7 @@ Popup { property string hoveredOverlayUri: "" property string hoveredOverlaySinkId: "" property bool hoveredOverVideoMuted: true + property bool isOnLocal: false property var listModel: ListModel { id: actionsModel @@ -47,6 +49,9 @@ Popup { onAboutToShow: { actionsModel.clear() actionsModel.append({"Top": true}) + if (root.isOnLocal) + actionsModel.append({"Name": JamiStrings.mirrorLocalVideo, + "IconSource": JamiResources.flip_24dp_svg}) if (hoveredOverlayUri !== "" && hoveredOverVideoMuted === false) actionsModel.append({"Name": JamiStrings.tileScreenshot, "IconSource" : JamiResources.screenshot_black_24dp_svg}) @@ -132,6 +137,10 @@ Popup { screenshotTaken() } break + case JamiStrings.mirrorLocalVideo: + UtilsAdapter.setAppValue(Settings.FlipSelf, !UtilsAdapter.getAppValue(Settings.FlipSelf)) + CurrentCall.flipSelf = UtilsAdapter.getAppValue(Settings.FlipSelf) + break } root.close() } diff --git a/src/app/mainview/components/OngoingCallPage.qml b/src/app/mainview/components/OngoingCallPage.qml index d73bfd6b847eb3412918c22af39fbd4d14b0ee9e..46e263645ec1d40b078c8ccb49588618d0cbed99 100644 --- a/src/app/mainview/components/OngoingCallPage.qml +++ b/src/app/mainview/components/OngoingCallPage.qml @@ -160,11 +160,14 @@ Rectangle { onTapped: function (eventPoint, button) { if (button === Qt.RightButton) { + var isOnLocal = eventPoint.position.x >= previewRenderer.x && eventPoint.position.x <= previewRenderer.x + previewRenderer.width + isOnLocal &= eventPoint.position.y >= previewRenderer.y && eventPoint.position.y <= previewRenderer.y + previewRenderer.height callOverlay.openCallViewContextMenuInPos(eventPoint.position.x, eventPoint.position.y, participantsLayer.hoveredOverlayUri, participantsLayer.hoveredOverlaySinkId, - participantsLayer.hoveredOverVideoMuted) + participantsLayer.hoveredOverVideoMuted, + isOnLocal) } } }