Skip to content
Snippets Groups Projects
Commit 7e025a2e authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

callbuttons: move fullscreen to layout settings

GitLab: #729

Change-Id: I0c179ee25fcc0a89e629c48017287a7de89c0ac2
parent 48154156
No related branches found
No related tags found
No related merge requests found
......@@ -289,6 +289,7 @@ Item {
property string notAvailable: qsTr("N/A")
property string lowerHand: qsTr("Lower hand")
property string raiseHand: qsTr("Raise hand")
property string layoutSettings: qsTr("Layout settings")
// Chatview header
property string hideChatView: qsTr("Hide chat view")
......
......@@ -146,6 +146,35 @@ Control {
}
}
},
Action {
id: layoutMenuAction
text: JamiStrings.layoutSettings
property int popupMode: CallActionBar.ActionPopupMode.ListElement
property var listModel: ListModel {
id: layoutModel
Component.onCompleted: {
layoutModel.append({"Name": layoutManager.isCallFullscreen ?
JamiStrings.exitFullScreen :
JamiStrings.viewFullScreen,
"IconSource": layoutManager.isCallFullscreen ?
JamiResources.close_fullscreen_24dp_svg :
JamiResources.open_in_full_24dp_svg})
}
}
function accept(index) {
switch(layoutModel.get(index).Name) {
case JamiStrings.exitFullScreen:
layoutModel.get(index).Name = JamiStrings.viewFullScreen
root.fullScreenClicked()
break
case JamiStrings.viewFullScreen:
layoutModel.get(index).Name = JamiStrings.exitFullScreen
root.fullScreenClicked()
break
}
}
},
Action {
id: videoInputMenuAction
enabled: VideoDevices.listSize !== 0
......@@ -229,17 +258,6 @@ Control {
icon.color: "white"
text: JamiStrings.chat
},
Action {
id: fullScreenAction
icon.source: layoutManager.isCallFullscreen ?
JamiResources.close_fullscreen_24dp_svg :
JamiResources.open_in_full_24dp_svg
icon.color: "white"
onTriggered: root.fullScreenClicked()
text: layoutManager.isCallFullscreen ?
JamiStrings.exitFullScreen :
JamiStrings.viewFullScreen
},
Action {
id: resumePauseCallAction
onTriggered: root.resumePauseCallClicked()
......@@ -293,6 +311,16 @@ Control {
JamiStrings.raiseHand
property real size: 34
},
Action {
id: layoutAction
property bool openPopupWhenClicked: true
checkable: !openPopupWhenClicked
icon.source: JamiResources.mosaic_black_24dp_svg
icon.color: "white"
text: JamiStrings.layoutSettings
property real size: 34
property var menuAction: layoutMenuAction
},
Action {
id: recordAction
onTriggered: root.recordCallClicked()
......@@ -363,9 +391,9 @@ Control {
CallOverlayModel.addSecondaryControl(chatAction)
if (CurrentAccount.videoEnabled_Video && !isSIP)
CallOverlayModel.addSecondaryControl(shareAction)
CallOverlayModel.addSecondaryControl(layoutAction)
CallOverlayModel.addSecondaryControl(recordAction)
CallOverlayModel.addSecondaryControl(pluginsAction)
CallOverlayModel.addSecondaryControl(fullScreenAction)
overflowItemCount = CallOverlayModel.secondaryModel().rowCount()
muteAudioAction.checked = isAudioMuted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment