Skip to content
Snippets Groups Projects
Commit 1510ccae authored by Sébastien Blin's avatar Sébastien Blin
Browse files

ongoingcallpage: move button to flip preview

Change-Id: I564e5b721b65caab9e8f01c12d30194db9e4844f
GitLab: #1039
parent 1c24fbf8
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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()
}
......
......@@ -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()
}
......
......@@ -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)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment