mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-07 18:43:34 +02:00
ongoingcallpage: move button to flip preview
Change-Id: I564e5b721b65caab9e8f01c12d30194db9e4844f GitLab: #1039
This commit is contained in:
parent
1c24fbf89b
commit
1510ccaede
4 changed files with 17 additions and 14 deletions
|
@ -188,10 +188,6 @@ Control {
|
||||||
UtilsAdapter.setAppValue(Settings.HideSpectators, !layoutModel.get(index).ActiveSetting)
|
UtilsAdapter.setAppValue(Settings.HideSpectators, !layoutModel.get(index).ActiveSetting)
|
||||||
CurrentCall.hideSpectators = UtilsAdapter.getAppValue(Settings.HideSpectators)
|
CurrentCall.hideSpectators = UtilsAdapter.getAppValue(Settings.HideSpectators)
|
||||||
break
|
break
|
||||||
case JamiStrings.mirrorLocalVideo:
|
|
||||||
UtilsAdapter.setAppValue(Settings.FlipSelf, !layoutModel.get(index).ActiveSetting)
|
|
||||||
CurrentCall.flipSelf = UtilsAdapter.getAppValue(Settings.FlipSelf)
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
@ -226,13 +222,6 @@ Control {
|
||||||
"SectionEnd": false})
|
"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,
|
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
||||||
"IconSource": JamiResources.open_in_full_24dp_svg,
|
"IconSource": JamiResources.open_in_full_24dp_svg,
|
||||||
"ActiveSetting": layoutManager.isCallFullscreen,
|
"ActiveSetting": layoutManager.isCallFullscreen,
|
||||||
|
|
|
@ -55,13 +55,15 @@ Item {
|
||||||
function openCallViewContextMenuInPos(x, y,
|
function openCallViewContextMenuInPos(x, y,
|
||||||
hoveredOverlayUri,
|
hoveredOverlayUri,
|
||||||
hoveredOverlaySinkId,
|
hoveredOverlaySinkId,
|
||||||
hoveredOverVideoMuted)
|
hoveredOverVideoMuted,
|
||||||
|
isOnLocal)
|
||||||
{
|
{
|
||||||
callViewContextMenu.x = root.width - x >= callViewContextMenu.width ? x : root.width - callViewContextMenu.width
|
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.y = root.height - y >= callViewContextMenu.height ? y : root.height - callViewContextMenu.height
|
||||||
callViewContextMenu.hoveredOverlayUri = hoveredOverlayUri
|
callViewContextMenu.hoveredOverlayUri = hoveredOverlayUri
|
||||||
callViewContextMenu.hoveredOverlaySinkId = hoveredOverlaySinkId
|
callViewContextMenu.hoveredOverlaySinkId = hoveredOverlaySinkId
|
||||||
callViewContextMenu.hoveredOverVideoMuted = hoveredOverVideoMuted
|
callViewContextMenu.hoveredOverVideoMuted = hoveredOverVideoMuted
|
||||||
|
callViewContextMenu.isOnLocal = isOnLocal
|
||||||
callViewContextMenu.open()
|
callViewContextMenu.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,10 @@ import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
import net.jami.Models 1.1
|
||||||
|
import net.jami.Enums 1.1
|
||||||
|
|
||||||
import "../../commoncomponents"
|
import "../../commoncomponents"
|
||||||
import "../../commoncomponents/contextmenu"
|
import "../../commoncomponents/contextmenu"
|
||||||
|
@ -39,6 +40,7 @@ Popup {
|
||||||
property string hoveredOverlayUri: ""
|
property string hoveredOverlayUri: ""
|
||||||
property string hoveredOverlaySinkId: ""
|
property string hoveredOverlaySinkId: ""
|
||||||
property bool hoveredOverVideoMuted: true
|
property bool hoveredOverVideoMuted: true
|
||||||
|
property bool isOnLocal: false
|
||||||
|
|
||||||
property var listModel: ListModel {
|
property var listModel: ListModel {
|
||||||
id: actionsModel
|
id: actionsModel
|
||||||
|
@ -47,6 +49,9 @@ Popup {
|
||||||
onAboutToShow: {
|
onAboutToShow: {
|
||||||
actionsModel.clear()
|
actionsModel.clear()
|
||||||
actionsModel.append({"Top": true})
|
actionsModel.append({"Top": true})
|
||||||
|
if (root.isOnLocal)
|
||||||
|
actionsModel.append({"Name": JamiStrings.mirrorLocalVideo,
|
||||||
|
"IconSource": JamiResources.flip_24dp_svg})
|
||||||
if (hoveredOverlayUri !== "" && hoveredOverVideoMuted === false)
|
if (hoveredOverlayUri !== "" && hoveredOverVideoMuted === false)
|
||||||
actionsModel.append({"Name": JamiStrings.tileScreenshot,
|
actionsModel.append({"Name": JamiStrings.tileScreenshot,
|
||||||
"IconSource" : JamiResources.screenshot_black_24dp_svg})
|
"IconSource" : JamiResources.screenshot_black_24dp_svg})
|
||||||
|
@ -132,6 +137,10 @@ Popup {
|
||||||
screenshotTaken()
|
screenshotTaken()
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
case JamiStrings.mirrorLocalVideo:
|
||||||
|
UtilsAdapter.setAppValue(Settings.FlipSelf, !UtilsAdapter.getAppValue(Settings.FlipSelf))
|
||||||
|
CurrentCall.flipSelf = UtilsAdapter.getAppValue(Settings.FlipSelf)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,11 +160,14 @@ Rectangle {
|
||||||
|
|
||||||
onTapped: function (eventPoint, button) {
|
onTapped: function (eventPoint, button) {
|
||||||
if (button === Qt.RightButton) {
|
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,
|
callOverlay.openCallViewContextMenuInPos(eventPoint.position.x,
|
||||||
eventPoint.position.y,
|
eventPoint.position.y,
|
||||||
participantsLayer.hoveredOverlayUri,
|
participantsLayer.hoveredOverlayUri,
|
||||||
participantsLayer.hoveredOverlaySinkId,
|
participantsLayer.hoveredOverlaySinkId,
|
||||||
participantsLayer.hoveredOverVideoMuted)
|
participantsLayer.hoveredOverVideoMuted,
|
||||||
|
isOnLocal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue