scrollbar in calls window right panel for small screens #LINQT-1897 (TODO fix numeric pad view)

This commit is contained in:
Gaelle Braud 2025-09-09 16:51:38 +02:00
parent 123c9022ec
commit 3866d7ecdd
11 changed files with 395 additions and 312 deletions

View file

@ -36,7 +36,7 @@ FocusScope {
id: searchBar id: searchBar
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Layout.fillWidth: true Layout.fillWidth: true
Layout.rightMargin: Math.round(39 * DefaultStyle.dp) // Layout.rightMargin: Math.round(39 * DefaultStyle.dp)
focus: true focus: true
color: mainItem.searchBarColor color: mainItem.searchBarColor
borderColor: mainItem.searchBarBorderColor borderColor: mainItem.searchBarBorderColor

View file

@ -81,7 +81,7 @@ ColumnLayout {
Layout.leftMargin: Math.round(16 * DefaultStyle.dp) Layout.leftMargin: Math.round(16 * DefaultStyle.dp)
Layout.rightMargin: Math.round(16 * DefaultStyle.dp) Layout.rightMargin: Math.round(16 * DefaultStyle.dp)
visible: mainItem.call?.core.localVideoEnabled || mainItem.call?.core.remoteVideoEnabled || false visible: mainItem.call && (mainItem.call.core.localVideoEnabled || mainItem.call.core.remoteVideoEnabled)
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: Math.round(12 * DefaultStyle.dp) spacing: Math.round(12 * DefaultStyle.dp)

View file

@ -323,7 +323,6 @@ Item {
// Changing cursor in MouseArea seems not to work with the Loader // Changing cursor in MouseArea seems not to work with the Loader
// Use override cursor for this case // Use override cursor for this case
onContainsMouseChanged: { onContainsMouseChanged: {
console.log("contains mouse", containsMouse)
if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor) if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor)
else UtilsCpp.restoreGlobalCursor() else UtilsCpp.restoreGlobalCursor()
thumbnailProvider.state = containsMouse ? 'hovered' : '' thumbnailProvider.state = containsMouse ? 'hovered' : ''

View file

@ -53,7 +53,7 @@ Item {
: call.core.remoteName : call.core.remoteName
: "" : ""
property var contactObj: UtilsCpp.findFriendByAddress(call.core.remoteAddress) property var contactObj: call ? UtilsCpp.findFriendByAddress(call.core.remoteAddress) : null
property var contact: contactObj && contactObj.value || null property var contact: contactObj && contactObj.value || null
property var identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null property var identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null

View file

@ -101,10 +101,14 @@ ColumnLayout {
} }
StackLayout { StackLayout {
currentIndex: bar.currentIndex currentIndex: bar.currentIndex
height: currentIndex === 0 ? screensLayout.contentHeight : windowsLayout.contentHeight
onHeightChanged: console.log("stacklayout height =====", height)
ListView{ ListView{
id: screensLayout id: screensLayout
spacing: Math.round(16 * DefaultStyle.dp) spacing: Math.round(16 * DefaultStyle.dp)
clip: true clip: true
Layout.fillWidth: true
height: contentHeight
//property int selectedIndex //property int selectedIndex
model: ScreenProxy{ model: ScreenProxy{
id: screensList id: screensList
@ -122,14 +126,15 @@ ColumnLayout {
if( mainItem.conference.core.isLocalScreenSharing) if( mainItem.conference.core.isLocalScreenSharing)
mainItem.call.core.videoSourceDescriptor = mainItem.desc mainItem.call.core.videoSourceDescriptor = mainItem.desc
} }
selected: //screensLayout.selectedIndex === index selected: mainItem.desc.core.screenSharingIndex === index
mainItem.desc.core.screenSharingIndex === index
} }
} }
GridView{ GridView{
id: windowsLayout id: windowsLayout
//property int selectedIndex //property int selectedIndex
Layout.preferredHeight: contentHeight
Layout.fillWidth: true
model: ScreenProxy{ model: ScreenProxy{
id: windowsList id: windowsList
mode: ScreenList.WINDOWS mode: ScreenList.WINDOWS
@ -139,7 +144,7 @@ ColumnLayout {
cellWidth: width / 2 cellWidth: width / 2
cellHeight: Math.round((112 + 15) * DefaultStyle.dp) cellHeight: Math.round((112 + 15) * DefaultStyle.dp)
clip: true clip: true
delegate: Item{ delegate: Item {
width: windowsLayout.cellWidth width: windowsLayout.cellWidth
height: windowsLayout.cellHeight height: windowsLayout.cellHeight
ScreenPreviewLayout { ScreenPreviewLayout {
@ -154,14 +159,13 @@ ColumnLayout {
mainItem.call.core.videoSourceDescriptor = mainItem.desc mainItem.call.core.videoSourceDescriptor = mainItem.desc
} }
selected: mainItem.desc.core.windowId == $modelData.windowId selected: mainItem.desc.core.windowId == $modelData.windowId
//onClicked: screensLayout.selectedIndex = index
//selected: screensLayout.selectedIndex === index
} }
} }
} }
} }
Button { BigButton {
Layout.preferredHeight: height
height: implicitHeight
visible: mainItem.screenSharingAvailable$ visible: mainItem.screenSharingAvailable$
enabled: windowsLayout.currentIndex !== -1 || screensLayout.currentIndex !== -1 enabled: windowsLayout.currentIndex !== -1 || screensLayout.currentIndex !== -1
text: mainItem.conference && mainItem.conference.core.isLocalScreenSharing text: mainItem.conference && mainItem.conference.core.isLocalScreenSharing

View file

@ -6,7 +6,7 @@ import Linphone
import UtilsCpp import UtilsCpp
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
FocusScope{ FocusScope {
id: mainItem id: mainItem
width: numPadGrid.width width: numPadGrid.width
height: numPadGrid.height height: numPadGrid.height
@ -90,8 +90,8 @@ FocusScope{
Layout.GridLayout { Layout.GridLayout {
id: numPadGrid id: numPadGrid
columns: 3 columns: 3
columnSpacing: (40 * DefaultStyle.dp) columnSpacing: Math.round(40 * DefaultStyle.dp)
rowSpacing: (10 * DefaultStyle.dp) rowSpacing: Math.round(10 * DefaultStyle.dp)
function getButtonAt(index){ function getButtonAt(index){
index = (index+15) % 15 index = (index+15) % 15
if(index >= 0){ if(index >= 0){
@ -113,8 +113,8 @@ FocusScope{
id: numPadButton id: numPadButton
Layout.Layout.alignment: Qt.AlignHCenter Layout.Layout.alignment: Qt.AlignHCenter
required property int index required property int index
implicitWidth: (60 * DefaultStyle.dp) implicitWidth: Math.round(60 * DefaultStyle.dp)
implicitHeight: (60 * DefaultStyle.dp) implicitHeight: Math.round(60 * DefaultStyle.dp)
onClicked: { onClicked: {
mainItem.buttonPressed(text) mainItem.buttonPressed(text)
} }
@ -123,10 +123,10 @@ FocusScope{
KeyNavigation.up: numPadGrid.getButtonAt(index - 3) KeyNavigation.up: numPadGrid.getButtonAt(index - 3)
KeyNavigation.down: numPadGrid.getButtonAt(index + 3) KeyNavigation.down: numPadGrid.getButtonAt(index + 3)
style: ButtonStyle.numericPad style: ButtonStyle.numericPad
radius: (71 * DefaultStyle.dp) radius: Math.round(71 * DefaultStyle.dp)
text: index + 1 text: index + 1
textSize: (32 * DefaultStyle.dp) textSize: Math.round(32 * DefaultStyle.dp)
textWeight: (400 * DefaultStyle.dp) textWeight: Math.round(400 * DefaultStyle.dp)
} }
} }
Repeater { Repeater {
@ -139,8 +139,8 @@ FocusScope{
BigButton { BigButton {
id: digitButton id: digitButton
Layout.Layout.alignment: Qt.AlignHCenter Layout.Layout.alignment: Qt.AlignHCenter
implicitWidth: (60 * DefaultStyle.dp) implicitWidth: Math.round(60 * DefaultStyle.dp)
implicitHeight: (60 * DefaultStyle.dp) implicitHeight: Math.round(60 * DefaultStyle.dp)
onClicked: mainItem.buttonPressed(pressText.text) onClicked: mainItem.buttonPressed(pressText.text)
onPressAndHold: mainItem.buttonPressed(longPressText.text) onPressAndHold: mainItem.buttonPressed(longPressText.text)
@ -149,7 +149,7 @@ FocusScope{
KeyNavigation.right: numPadGrid.getButtonAt((index + 1)+9) KeyNavigation.right: numPadGrid.getButtonAt((index + 1)+9)
KeyNavigation.up: numPadGrid.getButtonAt((index - 3)+9) KeyNavigation.up: numPadGrid.getButtonAt((index - 3)+9)
KeyNavigation.down: numPadGrid.getButtonAt((index + 3)+9) KeyNavigation.down: numPadGrid.getButtonAt((index + 3)+9)
radius: (71 * DefaultStyle.dp) radius: Math.round(71 * DefaultStyle.dp)
style: ButtonStyle.numericPad style: ButtonStyle.numericPad
contentItem: Item { contentItem: Item {
@ -163,7 +163,7 @@ FocusScope{
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
Component.onCompleted: {if (modelData.longPressText === undefined) anchors.centerIn= parent} Component.onCompleted: {if (modelData.longPressText === undefined) anchors.centerIn= parent}
text: modelData.pressText text: modelData.pressText
font.pixelSize: (32 * DefaultStyle.dp) font.pixelSize: Math.round(32 * DefaultStyle.dp)
} }
Text { Text {
id: longPressText id: longPressText
@ -175,7 +175,7 @@ FocusScope{
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
visible: modelData.longPressText ? modelData.longPressText.length > 0 : false visible: modelData.longPressText ? modelData.longPressText.length > 0 : false
text: modelData.longPressText ? modelData.longPressText : "" text: modelData.longPressText ? modelData.longPressText : ""
font.pixelSize: (22 * DefaultStyle.dp) font.pixelSize: Math.round(22 * DefaultStyle.dp)
} }
} }
} }
@ -187,12 +187,12 @@ FocusScope{
Button { Button {
id: launchCallButton id: launchCallButton
visible: mainItem.lastRowVisible visible: mainItem.lastRowVisible
implicitWidth: (75 * DefaultStyle.dp) implicitWidth: Math.round(75 * DefaultStyle.dp)
implicitHeight: (55 * DefaultStyle.dp) implicitHeight: Math.round(55 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter Layout.Layout.alignment: Qt.AlignHCenter
icon.width: (32 * DefaultStyle.dp) icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: (32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
radius: (71 * DefaultStyle.dp) radius: Math.round(71 * DefaultStyle.dp)
style: ButtonStyle.phoneGreen style: ButtonStyle.phoneGreen
onClicked: mainItem.launchCall() onClicked: mainItem.launchCall()
@ -205,17 +205,17 @@ FocusScope{
Button { Button {
id: eraseButton id: eraseButton
visible: mainItem.lastRowVisible visible: mainItem.lastRowVisible
leftPadding: (5 * DefaultStyle.dp) leftPadding: Math.round(5 * DefaultStyle.dp)
rightPadding: (5 * DefaultStyle.dp) rightPadding: Math.round(5 * DefaultStyle.dp)
topPadding: (5 * DefaultStyle.dp) topPadding: Math.round(5 * DefaultStyle.dp)
bottomPadding: (5 * DefaultStyle.dp) bottomPadding: Math.round(5 * DefaultStyle.dp)
Layout.Layout.alignment: Qt.AlignHCenter Layout.Layout.alignment: Qt.AlignHCenter
icon.source: AppIcons.backspaceFill icon.source: AppIcons.backspaceFill
style: ButtonStyle.noBackground style: ButtonStyle.noBackground
icon.width: (38 * DefaultStyle.dp) icon.width: Math.round(38 * DefaultStyle.dp)
icon.height: (38 * DefaultStyle.dp) icon.height: Math.round(38 * DefaultStyle.dp)
Layout.Layout.preferredWidth: (38 * DefaultStyle.dp) Layout.Layout.preferredWidth: Math.round(38 * DefaultStyle.dp)
Layout.Layout.preferredHeight: (38 * DefaultStyle.dp) Layout.Layout.preferredHeight: Math.round(38 * DefaultStyle.dp)
onClicked: mainItem.wipe() onClicked: mainItem.wipe()

View file

@ -18,7 +18,7 @@ FocusScope {
property var contact: contactObj?.value || null property var contact: contactObj?.value || null
property alias messagesLoading: chatMessagesListView.loading property alias messagesLoading: chatMessagesListView.loading
property CallGui call property CallGui call
property alias callHeaderContent: splitPanel.headerContentItem property alias callHeaderContent: splitPanel.header.contentItem
property bool replyingToMessage: false property bool replyingToMessage: false
enum PanelType { MessageReactions, SharedFiles, Medias, ImdnStatus, ForwardToList, ManageParticipants, EphemeralSettings, None} enum PanelType { MessageReactions, SharedFiles, Medias, ImdnStatus, ForwardToList, ManageParticipants, EphemeralSettings, None}
@ -79,12 +79,10 @@ FocusScope {
header.topPadding: Math.round(6 * DefaultStyle.dp) header.topPadding: Math.round(6 * DefaultStyle.dp)
header.bottomPadding: searchBarLayout.visible ? Math.round(3 * DefaultStyle.dp) : Math.round(6 * DefaultStyle.dp) header.bottomPadding: searchBarLayout.visible ? Math.round(3 * DefaultStyle.dp) : Math.round(6 * DefaultStyle.dp)
headerContentItem: ColumnLayout { header.contentItem: ColumnLayout {
anchors.left: parent?.left Layout.fillWidth: true
anchors.leftMargin: mainItem.call ? 0 : Math.round(31 * DefaultStyle.dp) Layout.leftMargin: mainItem.call ? 0 : Math.round(31 * DefaultStyle.dp)
anchors.verticalCenter: parent?.verticalCenter Layout.rightMargin: Math.round(41 * DefaultStyle.dp)
anchors.right: parent.right
anchors.rightMargin: Math.round(41 * DefaultStyle.dp)
spacing: searchBarLayout.visible ? Math.round(9 * DefaultStyle.dp) : 0 spacing: searchBarLayout.visible ? Math.round(9 * DefaultStyle.dp) : 0
RowLayout { RowLayout {
RowLayout { RowLayout {

View file

@ -7,8 +7,9 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
Control.Page { Control.Page {
id: mainItem id: mainItem
property alias headerStack: headerStack property alias headerStack: headerStack
property alias contentStackView: contentStackView property alias contentLoader: contentLoader
property alias customHeaderButtons: customButtonLayout.children property alias customHeaderButtons: customButtonLayout.children
property int contentItemHeight: scrollview.height
property bool closeButtonVisible: true property bool closeButtonVisible: true
clip: true clip: true
@ -19,8 +20,9 @@ Control.Page {
signal validateRequested() signal validateRequested()
topPadding: Math.round(20 * DefaultStyle.dp) topPadding: Math.round(20 * DefaultStyle.dp)
bottomPadding: Math.round(20 * DefaultStyle.dp)
leftPadding: Math.round(17 * DefaultStyle.dp) leftPadding: Math.round(17 * DefaultStyle.dp)
rightPadding: Math.round(17 * DefaultStyle.dp) rightPadding: Math.round(5 * DefaultStyle.dp)
background: Rectangle { background: Rectangle {
width: mainItem.width width: mainItem.width
@ -123,7 +125,31 @@ Control.Page {
} }
} }
} }
contentItem: Control.StackView { contentItem: Control.ScrollView {
id: contentStackView id: scrollview
width: mainItem.width - mainItem.leftPadding - mainItem.rightPadding
height: mainItem.height - mainItem.topPadding - mainItem.bottomPadding
Control.ScrollBar.vertical: ScrollBar {
id: scrollbar
anchors.right: scrollview.right
anchors.top: scrollview.top
anchors.bottom: scrollview.bottom
visible: contentControl.height > scrollview.height
}
Control.ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
Control.Control {
id: contentControl
rightPadding: Math.round(scrollbar.width + 10 * DefaultStyle.dp)
anchors.left: scrollview.left
anchors.right: scrollview.right
width: scrollview.width
// parent: scrollview
padding: 0
contentItem: Loader {
id: contentLoader
width: contentcontrol.width - contentControl.rightPadding
onHeightChanged: console.log("height current item in loader", height, contentControl.height, scrollview.height)
}
}
} }
} }

View file

@ -170,6 +170,7 @@ RowLayout {
Layout.preferredWidth: Math.round(292 * DefaultStyle.dp) Layout.preferredWidth: Math.round(292 * DefaultStyle.dp)
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
style: ButtonStyle.main style: ButtonStyle.main
//: Cancel
text: qsTr("cancel") text: qsTr("cancel")
onClicked: { onClicked: {
settingsButton.checked = false settingsButton.checked = false

View file

@ -20,7 +20,7 @@ AbstractMainPage {
emptyListText: qsTr("meetings_list_empty") emptyListText: qsTr("meetings_list_empty")
newItemIconSource: AppIcons.plusCircle newItemIconSource: AppIcons.plusCircle
rightPanelColor: selectedConference ? DefaultStyle.grey_0 : DefaultStyle.grey_100 rightPanelColor: selectedConference ? DefaultStyle.grey_0 : DefaultStyle.grey_100
showDefaultItem: leftPanelStackView.currentItem?.objectName === "listLayout" && meetingListCount === 0 showDefaultItem: leftPanelStackView.currentItem && leftPanelStackView.currentItem.objectName === "listLayout" && meetingListCount === 0
function createPreFilledMeeting(subject, addresses) { function createPreFilledMeeting(subject, addresses) {

View file

@ -12,6 +12,8 @@ import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle
AbstractWindow { AbstractWindow {
id: mainWindow id: mainWindow
flags: Qt.Window flags: Qt.Window
minimumWidth: Math.round(1020 * DefaultStyle.dp)
minimumHeight: Math.round(700 * DefaultStyle.dp)
// modality: Qt.WindowModal // modality: Qt.WindowModal
property CallGui call property CallGui call
@ -101,6 +103,9 @@ AbstractWindow {
function endCall(callToFinish) { function endCall(callToFinish) {
if (callToFinish) if (callToFinish)
callToFinish.core.lTerminate() callToFinish.core.lTerminate()
else {
if (!callsModel.haveCall) UtilsCpp.closeCallsWindow()
}
// var mainWin = UtilsCpp.getMainWindow() // var mainWin = UtilsCpp.getMainWindow()
// mainWin.goToCallHistory() // mainWin.goToCallHistory()
} }
@ -465,7 +470,8 @@ AbstractWindow {
id: encryptionStatusText id: encryptionStatusText
text: mainWindow.conference text: mainWindow.conference
? qsTr("call_srtp_point_to_point_encrypted") ? qsTr("call_srtp_point_to_point_encrypted")
:mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Srtp : mainWindow.call
? mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Srtp
//: Appel chiffré de point à point //: Appel chiffré de point à point
? qsTr("call_srtp_point_to_point_encrypted") ? qsTr("call_srtp_point_to_point_encrypted")
: mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp : mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp
@ -478,13 +484,16 @@ AbstractWindow {
//: "Appel non chiffré" //: "Appel non chiffré"
? qsTr("call_not_encrypted") ? qsTr("call_not_encrypted")
: qsTr("call_waiting_for_encryption_info") : qsTr("call_waiting_for_encryption_info")
: ""
color: mainWindow.conference || mainWindow.call?.core.encryption === LinphoneEnums.MediaEncryption.Srtp color: mainWindow.conference || mainWindow.call?.core.encryption === LinphoneEnums.MediaEncryption.Srtp
? DefaultStyle.info_500_main ? DefaultStyle.info_500_main
: mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp : mainWindow.call
? mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp
? mainWindow.call.core.isMismatch || !mainWindow.call.core.tokenVerified ? mainWindow.call.core.isMismatch || !mainWindow.call.core.tokenVerified
? DefaultStyle.warning_600 ? DefaultStyle.warning_600
: DefaultStyle.info_500_main : DefaultStyle.info_500_main
: DefaultStyle.grey_0 : DefaultStyle.grey_0
: DefaultStyle.grey_0
font { font {
pixelSize: Math.round(12 * DefaultStyle.dp) pixelSize: Math.round(12 * DefaultStyle.dp)
weight: Math.round(400 * DefaultStyle.dp) weight: Math.round(400 * DefaultStyle.dp)
@ -495,7 +504,7 @@ AbstractWindow {
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: { onClicked: {
if (rightPanel.visible if (rightPanel.visible
&& rightPanel.contentStackView.currentItem.objectName && rightPanel.contentLoader.item.objectName
=== "encryptionPanel") === "encryptionPanel")
rightPanel.visible = false rightPanel.visible = false
else { else {
@ -527,7 +536,7 @@ AbstractWindow {
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: { onClicked: {
if (rightPanel.visible if (rightPanel.visible
&& rightPanel.contentStackView.currentItem.objectName && rightPanel.contentLoader.item.objectName
=== "statsPanel") === "statsPanel")
rightPanel.visible = false rightPanel.visible = false
else { else {
@ -609,30 +618,89 @@ AbstractWindow {
Layout.topMargin: Math.round(10 * DefaultStyle.dp) Layout.topMargin: Math.round(10 * DefaultStyle.dp)
property int currentIndex: 0 property int currentIndex: 0
visible: false visible: false
onVisibleChanged: if(!visible) contentLoader.sourceComponent = null
function replace(id) { function replace(id) {
rightPanel.customHeaderButtons = null rightPanel.customHeaderButtons = null
contentStackView.replace(id, Control.StackView.Immediate) contentLoader.sourceComponent = id
} }
headerStack.currentIndex: 0 headerStack.currentIndex: 0
contentStackView.initialItem: callListPanel
headerValidateButtonText: qsTr("add") headerValidateButtonText: qsTr("add")
// Do not consider padding for chat
Binding on topPadding { Binding on topPadding {
when: rightPanel.contentStackView.currentItem.objectName === "chatPanel" when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName === "chatPanel"
value: 0 value: 0
restoreMode: Binding.RestoreBindingOrValue
} }
Binding on leftPadding { Binding on leftPadding {
when: rightPanel.contentStackView.currentItem.objectName === "chatPanel" when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName === "chatPanel"
value: 0 value: 0
restoreMode: Binding.RestoreBindingOrValue
} }
Binding on rightPadding { Binding on rightPadding {
when: rightPanel.contentStackView.currentItem.objectName == "chatPanel" when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName == "chatPanel"
value: 0 value: 0
restoreMode: Binding.RestoreBindingOrValue
} }
Binding on rightPadding { Connections {
when: rightPanel.contentStackView.currentItem.objectName == "participantListView" target: rightPanel.contentLoader
value: Math.round(10 * DefaultStyle.dp) function onItemChanged() {
if (rightPanel.contentLoader.item) {
if (rightPanel.contentLoader.item.objectName === "callTransferPanel") {
//: "Transférer %1 à"
rightPanel.headerTitleText = qsTr("call_transfer_current_call_title").arg(mainWindow.call.core.remoteName)
} }
else if (rightPanel.contentLoader.item.objectName === "newCallPanel") {
//: "Nouvel appel"
rightPanel.headerTitleText = qsTr("call_action_start_new_call")
}
else if (rightPanel.contentLoader.item.objectName === "dialerPanel") {
//: "Pavé numérique"
rightPanel.headerTitleText = qsTr("call_action_show_dialer")
}
else if (rightPanel.contentLoader.item.objectName === "changeLayoutPanel") {
//: "Modifier la disposition"
rightPanel.headerTitleText = qsTr("call_action_change_layout")
}
else if (rightPanel.contentLoader.item.objectName === "callListPanel") {
//: "Liste d'appel"
rightPanel.headerTitleText = qsTr("call_action_go_to_calls_list")
}
else if (rightPanel.contentLoader.item.objectName === "chatPanel") {
rightPanel.headerTitleText = ""
}
else if (rightPanel.contentLoader.item.objectName === "settingsPanel") {
//: "Paramètres"
rightPanel.headerTitleText = qsTr("call_action_go_to_settings")
}
else if (rightPanel.contentLoader.item.objectName === "screencastPanel") {
//: "Partage de votre écran"
rightPanel.headerTitleText = qsTr("conference_action_screen_sharing")
}
else if (rightPanel.contentLoader.item.objectName === "encryptionPanel") {
//: Chiffrement
rightPanel.headerTitleText = qsTr("call_encryption_title")
}
else if (rightPanel.contentLoader.item.objectName === "statsPanel") {
//: Statistiques
rightPanel.headerTitleText = qsTr("call_stats_title")
}
}
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "participantListPanel") rightPanel.headerStack.currentIndex = 0
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "callTransferPanel") transferCallButton.checked = false
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "newCallPanel") newCallButton.checked = false
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "callListPanel") callListButton.checked = false
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "screencastPanel") screencastPanelButton.checked = false
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "chatPanel") chatPanelButton.checked = false
if (!rightPanel.contentLoader.item || rightPanel.contentLoader.item.objectName !== "participantListPanel") participantListButton.checked = false
}
}
// Binding on rightPadding {
// when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName == "participantListView"
// value: Math.round(10 * DefaultStyle.dp)
// restoreMode: Binding.RestoreBindingOrValue
// }
Item { Item {
id: numericPadContainer id: numericPadContainer
@ -646,10 +714,13 @@ AbstractWindow {
Component { Component {
id: callTransferPanel id: callTransferPanel
Control.Control {
objectName: "callTransferPanel"
width: parent.width
NewCallForm { NewCallForm {
id: newCallForm id: newCallForm
//: "Transférer %1 à" width: parent.width
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_transfer_current_call_title").arg(mainWindow.call.core.remoteName) height: rightPanel.contentItemHeight
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
@ -699,13 +770,16 @@ AbstractWindow {
} }
} }
} }
}
Component { Component {
id: newCallPanel id: newCallPanel
Control.Control {
objectName: "newCallPanel"
width: parent.width
NewCallForm { NewCallForm {
id: newCallForm id: newCallForm
objectName: "newCallPanel" width: parent.width
//: "Nouvel appel" height: rightPanel.contentItemHeight
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_start_new_call")
groupCallVisible: false groupCallVisible: false
searchBarColor: DefaultStyle.grey_0 searchBarColor: DefaultStyle.grey_0
searchBarBorderColor: DefaultStyle.grey_200 searchBarBorderColor: DefaultStyle.grey_200
@ -740,23 +814,27 @@ AbstractWindow {
} }
} }
} }
}
Component { Component {
id: dialerPanel id: dialerPanel
Item { Control.Control {
id: dialerPanelContent id: dialerPanelContent
//: "Pavé numérique" objectName: "dialerPanel"
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_show_dialer") width: parent.width
anchors.top: parent.top
anchors.bottom: parent.bottom
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
} }
FocusScope {
width: parent.width
height: rightPanel.contentItemHeight
ColumnLayout {
anchors.fill: parent
spacing: Math.round(41 * DefaultStyle.dp)
Item{Layout.fillHeight: true}
SearchBar { SearchBar {
anchors.leftMargin: Math.round(10 * DefaultStyle.dp) id: searchBar
anchors.rightMargin: Math.round(10 * DefaultStyle.dp) height: Math.round(45 * DefaultStyle.dp)
anchors.bottom: numPad.top
anchors.bottomMargin: Math.round(41 * DefaultStyle.dp)
magnifierVisible: false magnifierVisible: false
color: DefaultStyle.grey_0 color: DefaultStyle.grey_0
borderColor: DefaultStyle.grey_200 borderColor: DefaultStyle.grey_200
@ -767,11 +845,10 @@ AbstractWindow {
} }
NumericPad { NumericPad {
id: numPad id: numPad
anchors.horizontalCenter: parent.horizontalCenter Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
anchors.bottom: parent.bottom Layout.bottomMargin: Math.round(18 * DefaultStyle.dp)
currentCall: callsModel.currentCall currentCall: callsModel.currentCall
lastRowVisible: false lastRowVisible: false
anchors.bottomMargin: Math.round(18 * DefaultStyle.dp)
onLaunchCall: { onLaunchCall: {
UtilsCpp.createCall(dialerTextInput.text) UtilsCpp.createCall(dialerTextInput.text)
} }
@ -779,11 +856,13 @@ AbstractWindow {
} }
} }
} }
}
}
Component { Component {
id: changeLayoutPanel id: changeLayoutPanel
ChangeLayoutForm { ChangeLayoutForm {
//: "Modifier la disposition" objectName: "changeLayoutPanel"
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_change_layout") width: parent.width
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
@ -797,12 +876,7 @@ AbstractWindow {
Component { Component {
id: callListPanel id: callListPanel
ColumnLayout { ColumnLayout {
Control.StackView.onActivated: { objectName: "callListPanel"
//: "Liste d'appel"
rightPanel.headerTitleText = qsTr("call_action_go_to_calls_list")
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(
rightPanel)
}
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
@ -848,74 +922,79 @@ AbstractWindow {
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true
} }
Connections {
target: rightPanel.contentLoader
function onItemChanged() {
if (rightPanel.contentLoader.item.objectName === "callListPanel") {
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
}
}
}
} }
} }
Component { Component {
id: chatPanel id: chatPanel
Item { Control.Control {
id: chatPanelContent
objectName: "chatPanel" objectName: "chatPanel"
Control.StackView.onActivated: { width: parent.width
rightPanel.customHeaderButtons = chatView.callHeaderContent SelectedChatView {
rightPanel.headerTitleText = "" id: chatView
} width: parent.width
height: rightPanel.contentItemHeight
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
} }
SelectedChatView {
id: chatView
anchors.fill: parent
call: mainWindow.call call: mainWindow.call
property var chatObj: UtilsCpp.getCurrentCallChat(mainWindow.call) property var chatObj: UtilsCpp.getCurrentCallChat(mainWindow.call)
chat: chatObj ? chatObj.value : null chat: chatObj ? chatObj.value : null
} }
Connections {
target: rightPanel.contentLoader
function onItemChanged() {
if (rightPanel.contentLoader.item.objectName === "chatPanel") {
rightPanel.customHeaderButtons = chatView.callHeaderContent
}
}
}
} }
} }
Component { Component {
id: settingsPanel id: settingsPanel
Item { MultimediaSettings {
Control.StackView.onActivated: { id: inSettingsPanel
//: "Paramètres" objectName: "settingsPanel"
rightPanel.headerTitleText = qsTr("call_action_go_to_settings")
}
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
} }
MultimediaSettings {
id: inSettingsPanel
call: mainWindow.call call: mainWindow.call
anchors.fill: parent height: childrenRect.height
anchors.topMargin: Math.round(16 * DefaultStyle.dp) width: parent.width
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
}
} }
} }
Component { Component {
id: screencastPanel id: screencastPanel
Item { Control.Control {
//: "Partage de votre écran" objectName: "screencastPanel"
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("conference_action_screen_sharing") width: parent.width
height: contentChildren.height
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
event.accepted = true event.accepted = true
} }
ScreencastSettings { contentItem: ScreencastSettings {
anchors.fill: parent id: screencastsettings
anchors.topMargin: Math.round(16 * DefaultStyle.dp) anchors.topMargin: Math.round(16 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp) width: parent.width
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
call: mainWindow.call call: mainWindow.call
} }
} }
} }
Component { Component {
id: participantListPanel id: participantListPanel
Item { Control.Control {
width: parent.width
objectName: "participantListPanel" objectName: "participantListPanel"
Keys.onEscapePressed: event => { Keys.onEscapePressed: event => {
rightPanel.visible = false rightPanel.visible = false
@ -923,13 +1002,14 @@ AbstractWindow {
} }
Control.StackView { Control.StackView {
id: participantsStack id: participantsStack
anchors.fill: parent width: parent.width
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp) height: rightPanel.contentItemHeight
anchors.leftMargin: Math.round(17 * DefaultStyle.dp) // anchors.fill: parent
anchors.rightMargin: Math.round(17 * DefaultStyle.dp) // anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
// anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
// anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
initialItem: participantListComp initialItem: participantListComp
onCurrentItemChanged: rightPanel.headerStack.currentIndex onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
= currentItem.Control.StackView.index
property list<string> selectedParticipants property list<string> selectedParticipants
Connections { Connections {
@ -945,6 +1025,8 @@ AbstractWindow {
id: participantList id: participantList
objectName: "participantListView" objectName: "participantListView"
call: mainWindow.call call: mainWindow.call
height: contentHeight
width: parent.width
rightMargin: 0 rightMargin: 0
Component { Component {
id: headerbutton id: headerbutton
@ -963,7 +1045,8 @@ AbstractWindow {
} }
} }
} }
Control.StackView.onActivated: {
onVisibleChanged: if (visible) {
rightPanel.customHeaderButtons = headerbutton.createObject(rightPanel) rightPanel.customHeaderButtons = headerbutton.createObject(rightPanel)
//: "Participants (%1)" //: "Participants (%1)"
rightPanel.headerTitleText = qsTr("conference_participants_list_title").arg(count) rightPanel.headerTitleText = qsTr("conference_participants_list_title").arg(count)
@ -982,8 +1065,7 @@ AbstractWindow {
Connections { Connections {
target: rightPanel target: rightPanel
function onValidateRequested() { function onValidateRequested() {
participantList.model.addAddresses( participantList.model.addAddresses(participantsStack.selectedParticipants)
participantsStack.selectedParticipants)
participantsStack.pop() participantsStack.pop()
} }
} }
@ -993,6 +1075,8 @@ AbstractWindow {
id: addParticipantComp id: addParticipantComp
AddParticipantsForm { AddParticipantsForm {
id: addParticipantLayout id: addParticipantLayout
// height: childrenRect.height
// width: parent.width
searchBarColor: DefaultStyle.grey_0 searchBarColor: DefaultStyle.grey_0
searchBarBorderColor: DefaultStyle.grey_200 searchBarBorderColor: DefaultStyle.grey_200
onSelectedParticipantsCountChanged: { onSelectedParticipantsCountChanged: {
@ -1005,6 +1089,8 @@ AbstractWindow {
if (participantsStack.currentItem == addParticipantLayout) { if (participantsStack.currentItem == addParticipantLayout) {
rightPanel.headerTitleText = qsTr("meeting_schedule_add_participants_title") rightPanel.headerTitleText = qsTr("meeting_schedule_add_participants_title")
rightPanel.headerSubtitleText = qsTr("group_call_participant_selected", '', addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length) rightPanel.headerSubtitleText = qsTr("group_call_participant_selected", '', addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length)
} else {
rightPanel.headerSubtitleText = ""
} }
} }
} }
@ -1018,10 +1104,7 @@ AbstractWindow {
EncryptionSettings { EncryptionSettings {
objectName: "encryptionPanel" objectName: "encryptionPanel"
call: mainWindow.call call: mainWindow.call
Control.StackView.onActivated: { width: parent.width
//: Chiffrement
rightPanel.headerTitleText = qsTr("call_encryption_title")
}
onEncryptionValidationRequested: zrtpValidation.open() onEncryptionValidationRequested: zrtpValidation.open()
} }
} }
@ -1029,10 +1112,7 @@ AbstractWindow {
id: statsPanel id: statsPanel
CallStatistics { CallStatistics {
objectName: "statsPanel" objectName: "statsPanel"
Control.StackView.onActivated: { width: parent.width
//: Statistiques
rightPanel.headerTitleText = qsTr("call_stats_title")
}
call: mainWindow.call call: mainWindow.call
} }
} }
@ -1072,7 +1152,6 @@ AbstractWindow {
target: rightPanel target: rightPanel
function onVisibleChanged() { function onVisibleChanged() {
if (!rightPanel.visible) { if (!rightPanel.visible) {
console.log("unceck settings button")
waitingRoomIn.settingsButtonChecked = false waitingRoomIn.settingsButtonChecked = false
} }
} }
@ -1216,7 +1295,7 @@ AbstractWindow {
contentImageColor: DefaultStyle.grey_0 contentImageColor: DefaultStyle.grey_0
//: "Transférer l'appel" //: "Transférer l'appel"
ToolTip.text: qsTr("call_action_transfer_call") ToolTip.text: qsTr("call_action_transfer_call")
onCheckedChanged: { onToggled: {
console.log("checked transfer changed", checked) console.log("checked transfer changed", checked)
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
@ -1225,13 +1304,6 @@ AbstractWindow {
rightPanel.visible = false rightPanel.visible = false
} }
} }
Connections {
target: rightPanel
function onVisibleChanged() {
if (!rightPanel.visible)
transferCallButton.checked = false
}
}
} }
CheckableButton { CheckableButton {
id: newCallButton id: newCallButton
@ -1243,7 +1315,7 @@ AbstractWindow {
icon.height: Math.round(32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
//: "Initier un nouvel appel" //: "Initier un nouvel appel"
ToolTip.text: qsTr("call_action_start_new_call_hint") ToolTip.text: qsTr("call_action_start_new_call_hint")
onCheckedChanged: { onToggled: {
console.log("checked newcall changed", checked) console.log("checked newcall changed", checked)
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
@ -1252,13 +1324,6 @@ AbstractWindow {
rightPanel.visible = false rightPanel.visible = false
} }
} }
Connections {
target: rightPanel
function onVisibleChanged() {
if (!rightPanel.visible)
newCallButton.checked = false
}
}
} }
CheckableButton { CheckableButton {
id: callListButton id: callListButton
@ -1270,7 +1335,7 @@ AbstractWindow {
icon.height: Math.round(32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
//: "Afficher la liste d'appels" //: "Afficher la liste d'appels"
ToolTip.text: qsTr("call_display_call_list_hint") ToolTip.text: qsTr("call_display_call_list_hint")
onCheckedChanged: { onToggled: {
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
rightPanel.replace(callListPanel) rightPanel.replace(callListPanel)
@ -1278,13 +1343,6 @@ AbstractWindow {
rightPanel.visible = false rightPanel.visible = false
} }
} }
Connections {
target: rightPanel
function onVisibleChanged() {
if (!rightPanel.visible)
newCallButton.checked = false
}
}
} }
} }
RowLayout { RowLayout {
@ -1336,6 +1394,7 @@ AbstractWindow {
!mainWindow.call.core.microphoneMuted) !mainWindow.call.core.microphoneMuted)
} }
CheckableButton { CheckableButton {
id: screencastPanelButton
iconUrl: AppIcons.screencast iconUrl: AppIcons.screencast
visible: !!mainWindow.conference visible: !!mainWindow.conference
//: Partager l'écran //: Partager l'écran
@ -1344,7 +1403,7 @@ AbstractWindow {
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp) Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
icon.width: Math.round(32 * DefaultStyle.dp) icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
onCheckedChanged: { onToggled: {
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
rightPanel.replace(screencastPanel) rightPanel.replace(screencastPanel)
@ -1354,6 +1413,7 @@ AbstractWindow {
} }
} }
CheckableButton { CheckableButton {
id: chatPanelButton
iconUrl: AppIcons.chatTeardropText iconUrl: AppIcons.chatTeardropText
//: Open chat //: Open chat
ToolTip.text: qsTr("call_open_chat_hint") ToolTip.text: qsTr("call_open_chat_hint")
@ -1361,7 +1421,7 @@ AbstractWindow {
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp) Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
icon.width: Math.round(32 * DefaultStyle.dp) icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
onCheckedChanged: { onToggled: {
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
rightPanel.replace(chatPanel) rightPanel.replace(chatPanel)
@ -1401,7 +1461,7 @@ AbstractWindow {
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp) Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
icon.width: Math.round(32 * DefaultStyle.dp) icon.width: Math.round(32 * DefaultStyle.dp)
icon.height: Math.round(32 * DefaultStyle.dp) icon.height: Math.round(32 * DefaultStyle.dp)
onCheckedChanged: { onToggled: {
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
rightPanel.replace(participantListPanel) rightPanel.replace(participantListPanel)
@ -1409,11 +1469,6 @@ AbstractWindow {
rightPanel.visible = false rightPanel.visible = false
} }
} }
Connections {
target: rightPanel
onVisibleChanged: if (!rightPanel.visible)
participantListButton.checked = false
}
} }
PopupButton { PopupButton {
id: moreOptionsButton id: moreOptionsButton