mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
scrollbar in calls window right panel for small screens #LINQT-1897 (TODO fix numeric pad view)
This commit is contained in:
parent
123c9022ec
commit
3866d7ecdd
11 changed files with 395 additions and 312 deletions
|
|
@ -36,7 +36,7 @@ FocusScope {
|
|||
id: searchBar
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Math.round(39 * DefaultStyle.dp)
|
||||
// Layout.rightMargin: Math.round(39 * DefaultStyle.dp)
|
||||
focus: true
|
||||
color: mainItem.searchBarColor
|
||||
borderColor: mainItem.searchBarBorderColor
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ ColumnLayout {
|
|||
Layout.leftMargin: 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 {
|
||||
spacing: Math.round(12 * DefaultStyle.dp)
|
||||
|
|
|
|||
|
|
@ -323,7 +323,6 @@ Item {
|
|||
// Changing cursor in MouseArea seems not to work with the Loader
|
||||
// Use override cursor for this case
|
||||
onContainsMouseChanged: {
|
||||
console.log("contains mouse", containsMouse)
|
||||
if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor)
|
||||
else UtilsCpp.restoreGlobalCursor()
|
||||
thumbnailProvider.state = containsMouse ? 'hovered' : ''
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Item {
|
|||
: 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 identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null
|
||||
|
|
|
|||
|
|
@ -101,10 +101,14 @@ ColumnLayout {
|
|||
}
|
||||
StackLayout {
|
||||
currentIndex: bar.currentIndex
|
||||
height: currentIndex === 0 ? screensLayout.contentHeight : windowsLayout.contentHeight
|
||||
onHeightChanged: console.log("stacklayout height =====", height)
|
||||
ListView{
|
||||
id: screensLayout
|
||||
spacing: Math.round(16 * DefaultStyle.dp)
|
||||
clip: true
|
||||
Layout.fillWidth: true
|
||||
height: contentHeight
|
||||
//property int selectedIndex
|
||||
model: ScreenProxy{
|
||||
id: screensList
|
||||
|
|
@ -122,14 +126,15 @@ ColumnLayout {
|
|||
if( mainItem.conference.core.isLocalScreenSharing)
|
||||
mainItem.call.core.videoSourceDescriptor = mainItem.desc
|
||||
}
|
||||
selected: //screensLayout.selectedIndex === index
|
||||
mainItem.desc.core.screenSharingIndex === index
|
||||
selected: mainItem.desc.core.screenSharingIndex === index
|
||||
}
|
||||
}
|
||||
|
||||
GridView{
|
||||
id: windowsLayout
|
||||
//property int selectedIndex
|
||||
Layout.preferredHeight: contentHeight
|
||||
Layout.fillWidth: true
|
||||
model: ScreenProxy{
|
||||
id: windowsList
|
||||
mode: ScreenList.WINDOWS
|
||||
|
|
@ -154,14 +159,13 @@ ColumnLayout {
|
|||
mainItem.call.core.videoSourceDescriptor = mainItem.desc
|
||||
}
|
||||
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$
|
||||
enabled: windowsLayout.currentIndex !== -1 || screensLayout.currentIndex !== -1
|
||||
text: mainItem.conference && mainItem.conference.core.isLocalScreenSharing
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ FocusScope{
|
|||
Layout.GridLayout {
|
||||
id: numPadGrid
|
||||
columns: 3
|
||||
columnSpacing: (40 * DefaultStyle.dp)
|
||||
rowSpacing: (10 * DefaultStyle.dp)
|
||||
columnSpacing: Math.round(40 * DefaultStyle.dp)
|
||||
rowSpacing: Math.round(10 * DefaultStyle.dp)
|
||||
function getButtonAt(index){
|
||||
index = (index+15) % 15
|
||||
if(index >= 0){
|
||||
|
|
@ -113,8 +113,8 @@ FocusScope{
|
|||
id: numPadButton
|
||||
Layout.Layout.alignment: Qt.AlignHCenter
|
||||
required property int index
|
||||
implicitWidth: (60 * DefaultStyle.dp)
|
||||
implicitHeight: (60 * DefaultStyle.dp)
|
||||
implicitWidth: Math.round(60 * DefaultStyle.dp)
|
||||
implicitHeight: Math.round(60 * DefaultStyle.dp)
|
||||
onClicked: {
|
||||
mainItem.buttonPressed(text)
|
||||
}
|
||||
|
|
@ -123,10 +123,10 @@ FocusScope{
|
|||
KeyNavigation.up: numPadGrid.getButtonAt(index - 3)
|
||||
KeyNavigation.down: numPadGrid.getButtonAt(index + 3)
|
||||
style: ButtonStyle.numericPad
|
||||
radius: (71 * DefaultStyle.dp)
|
||||
radius: Math.round(71 * DefaultStyle.dp)
|
||||
text: index + 1
|
||||
textSize: (32 * DefaultStyle.dp)
|
||||
textWeight: (400 * DefaultStyle.dp)
|
||||
textSize: Math.round(32 * DefaultStyle.dp)
|
||||
textWeight: Math.round(400 * DefaultStyle.dp)
|
||||
}
|
||||
}
|
||||
Repeater {
|
||||
|
|
@ -139,8 +139,8 @@ FocusScope{
|
|||
BigButton {
|
||||
id: digitButton
|
||||
Layout.Layout.alignment: Qt.AlignHCenter
|
||||
implicitWidth: (60 * DefaultStyle.dp)
|
||||
implicitHeight: (60 * DefaultStyle.dp)
|
||||
implicitWidth: Math.round(60 * DefaultStyle.dp)
|
||||
implicitHeight: Math.round(60 * DefaultStyle.dp)
|
||||
|
||||
onClicked: mainItem.buttonPressed(pressText.text)
|
||||
onPressAndHold: mainItem.buttonPressed(longPressText.text)
|
||||
|
|
@ -149,7 +149,7 @@ FocusScope{
|
|||
KeyNavigation.right: numPadGrid.getButtonAt((index + 1)+9)
|
||||
KeyNavigation.up: 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
|
||||
|
||||
contentItem: Item {
|
||||
|
|
@ -163,7 +163,7 @@ FocusScope{
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
Component.onCompleted: {if (modelData.longPressText === undefined) anchors.centerIn= parent}
|
||||
text: modelData.pressText
|
||||
font.pixelSize: (32 * DefaultStyle.dp)
|
||||
font.pixelSize: Math.round(32 * DefaultStyle.dp)
|
||||
}
|
||||
Text {
|
||||
id: longPressText
|
||||
|
|
@ -175,7 +175,7 @@ FocusScope{
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
visible: modelData.longPressText ? modelData.longPressText.length > 0 : false
|
||||
text: modelData.longPressText ? modelData.longPressText : ""
|
||||
font.pixelSize: (22 * DefaultStyle.dp)
|
||||
font.pixelSize: Math.round(22 * DefaultStyle.dp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -187,12 +187,12 @@ FocusScope{
|
|||
Button {
|
||||
id: launchCallButton
|
||||
visible: mainItem.lastRowVisible
|
||||
implicitWidth: (75 * DefaultStyle.dp)
|
||||
implicitHeight: (55 * DefaultStyle.dp)
|
||||
implicitWidth: Math.round(75 * DefaultStyle.dp)
|
||||
implicitHeight: Math.round(55 * DefaultStyle.dp)
|
||||
Layout.Layout.alignment: Qt.AlignHCenter
|
||||
icon.width: (32 * DefaultStyle.dp)
|
||||
icon.height: (32 * DefaultStyle.dp)
|
||||
radius: (71 * DefaultStyle.dp)
|
||||
icon.width: Math.round(32 * DefaultStyle.dp)
|
||||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
radius: Math.round(71 * DefaultStyle.dp)
|
||||
style: ButtonStyle.phoneGreen
|
||||
|
||||
onClicked: mainItem.launchCall()
|
||||
|
|
@ -205,17 +205,17 @@ FocusScope{
|
|||
Button {
|
||||
id: eraseButton
|
||||
visible: mainItem.lastRowVisible
|
||||
leftPadding: (5 * DefaultStyle.dp)
|
||||
rightPadding: (5 * DefaultStyle.dp)
|
||||
topPadding: (5 * DefaultStyle.dp)
|
||||
bottomPadding: (5 * DefaultStyle.dp)
|
||||
leftPadding: Math.round(5 * DefaultStyle.dp)
|
||||
rightPadding: Math.round(5 * DefaultStyle.dp)
|
||||
topPadding: Math.round(5 * DefaultStyle.dp)
|
||||
bottomPadding: Math.round(5 * DefaultStyle.dp)
|
||||
Layout.Layout.alignment: Qt.AlignHCenter
|
||||
icon.source: AppIcons.backspaceFill
|
||||
style: ButtonStyle.noBackground
|
||||
icon.width: (38 * DefaultStyle.dp)
|
||||
icon.height: (38 * DefaultStyle.dp)
|
||||
Layout.Layout.preferredWidth: (38 * DefaultStyle.dp)
|
||||
Layout.Layout.preferredHeight: (38 * DefaultStyle.dp)
|
||||
icon.width: Math.round(38 * DefaultStyle.dp)
|
||||
icon.height: Math.round(38 * DefaultStyle.dp)
|
||||
Layout.Layout.preferredWidth: Math.round(38 * DefaultStyle.dp)
|
||||
Layout.Layout.preferredHeight: Math.round(38 * DefaultStyle.dp)
|
||||
|
||||
onClicked: mainItem.wipe()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ FocusScope {
|
|||
property var contact: contactObj?.value || null
|
||||
property alias messagesLoading: chatMessagesListView.loading
|
||||
property CallGui call
|
||||
property alias callHeaderContent: splitPanel.headerContentItem
|
||||
property alias callHeaderContent: splitPanel.header.contentItem
|
||||
property bool replyingToMessage: false
|
||||
enum PanelType { MessageReactions, SharedFiles, Medias, ImdnStatus, ForwardToList, ManageParticipants, EphemeralSettings, None}
|
||||
|
||||
|
|
@ -79,12 +79,10 @@ FocusScope {
|
|||
header.topPadding: Math.round(6 * DefaultStyle.dp)
|
||||
header.bottomPadding: searchBarLayout.visible ? Math.round(3 * DefaultStyle.dp) : Math.round(6 * DefaultStyle.dp)
|
||||
|
||||
headerContentItem: ColumnLayout {
|
||||
anchors.left: parent?.left
|
||||
anchors.leftMargin: mainItem.call ? 0 : Math.round(31 * DefaultStyle.dp)
|
||||
anchors.verticalCenter: parent?.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Math.round(41 * DefaultStyle.dp)
|
||||
header.contentItem: ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: mainItem.call ? 0 : Math.round(31 * DefaultStyle.dp)
|
||||
Layout.rightMargin: Math.round(41 * DefaultStyle.dp)
|
||||
spacing: searchBarLayout.visible ? Math.round(9 * DefaultStyle.dp) : 0
|
||||
RowLayout {
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
|||
Control.Page {
|
||||
id: mainItem
|
||||
property alias headerStack: headerStack
|
||||
property alias contentStackView: contentStackView
|
||||
property alias contentLoader: contentLoader
|
||||
property alias customHeaderButtons: customButtonLayout.children
|
||||
property int contentItemHeight: scrollview.height
|
||||
property bool closeButtonVisible: true
|
||||
clip: true
|
||||
|
||||
|
|
@ -19,8 +20,9 @@ Control.Page {
|
|||
signal validateRequested()
|
||||
|
||||
topPadding: Math.round(20 * DefaultStyle.dp)
|
||||
bottomPadding: Math.round(20 * DefaultStyle.dp)
|
||||
leftPadding: Math.round(17 * DefaultStyle.dp)
|
||||
rightPadding: Math.round(17 * DefaultStyle.dp)
|
||||
rightPadding: Math.round(5 * DefaultStyle.dp)
|
||||
|
||||
background: Rectangle {
|
||||
width: mainItem.width
|
||||
|
|
@ -123,7 +125,31 @@ Control.Page {
|
|||
}
|
||||
}
|
||||
}
|
||||
contentItem: Control.StackView {
|
||||
id: contentStackView
|
||||
contentItem: Control.ScrollView {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ RowLayout {
|
|||
Layout.preferredWidth: Math.round(292 * DefaultStyle.dp)
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
style: ButtonStyle.main
|
||||
//: Cancel
|
||||
text: qsTr("cancel")
|
||||
onClicked: {
|
||||
settingsButton.checked = false
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ AbstractMainPage {
|
|||
emptyListText: qsTr("meetings_list_empty")
|
||||
newItemIconSource: AppIcons.plusCircle
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle
|
|||
AbstractWindow {
|
||||
id: mainWindow
|
||||
flags: Qt.Window
|
||||
minimumWidth: Math.round(1020 * DefaultStyle.dp)
|
||||
minimumHeight: Math.round(700 * DefaultStyle.dp)
|
||||
|
||||
// modality: Qt.WindowModal
|
||||
property CallGui call
|
||||
|
|
@ -101,6 +103,9 @@ AbstractWindow {
|
|||
function endCall(callToFinish) {
|
||||
if (callToFinish)
|
||||
callToFinish.core.lTerminate()
|
||||
else {
|
||||
if (!callsModel.haveCall) UtilsCpp.closeCallsWindow()
|
||||
}
|
||||
// var mainWin = UtilsCpp.getMainWindow()
|
||||
// mainWin.goToCallHistory()
|
||||
}
|
||||
|
|
@ -465,7 +470,8 @@ AbstractWindow {
|
|||
id: encryptionStatusText
|
||||
text: mainWindow.conference
|
||||
? 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
|
||||
? qsTr("call_srtp_point_to_point_encrypted")
|
||||
: mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp
|
||||
|
|
@ -478,13 +484,16 @@ AbstractWindow {
|
|||
//: "Appel non chiffré"
|
||||
? qsTr("call_not_encrypted")
|
||||
: qsTr("call_waiting_for_encryption_info")
|
||||
: ""
|
||||
color: mainWindow.conference || mainWindow.call?.core.encryption === LinphoneEnums.MediaEncryption.Srtp
|
||||
? 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
|
||||
? DefaultStyle.warning_600
|
||||
: DefaultStyle.info_500_main
|
||||
: DefaultStyle.grey_0
|
||||
: DefaultStyle.grey_0
|
||||
font {
|
||||
pixelSize: Math.round(12 * DefaultStyle.dp)
|
||||
weight: Math.round(400 * DefaultStyle.dp)
|
||||
|
|
@ -495,7 +504,7 @@ AbstractWindow {
|
|||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
onClicked: {
|
||||
if (rightPanel.visible
|
||||
&& rightPanel.contentStackView.currentItem.objectName
|
||||
&& rightPanel.contentLoader.item.objectName
|
||||
=== "encryptionPanel")
|
||||
rightPanel.visible = false
|
||||
else {
|
||||
|
|
@ -527,7 +536,7 @@ AbstractWindow {
|
|||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
onClicked: {
|
||||
if (rightPanel.visible
|
||||
&& rightPanel.contentStackView.currentItem.objectName
|
||||
&& rightPanel.contentLoader.item.objectName
|
||||
=== "statsPanel")
|
||||
rightPanel.visible = false
|
||||
else {
|
||||
|
|
@ -609,30 +618,89 @@ AbstractWindow {
|
|||
Layout.topMargin: Math.round(10 * DefaultStyle.dp)
|
||||
property int currentIndex: 0
|
||||
visible: false
|
||||
onVisibleChanged: if(!visible) contentLoader.sourceComponent = null
|
||||
function replace(id) {
|
||||
rightPanel.customHeaderButtons = null
|
||||
contentStackView.replace(id, Control.StackView.Immediate)
|
||||
contentLoader.sourceComponent = id
|
||||
}
|
||||
headerStack.currentIndex: 0
|
||||
contentStackView.initialItem: callListPanel
|
||||
headerValidateButtonText: qsTr("add")
|
||||
|
||||
// Do not consider padding for chat
|
||||
Binding on topPadding {
|
||||
when: rightPanel.contentStackView.currentItem.objectName === "chatPanel"
|
||||
when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName === "chatPanel"
|
||||
value: 0
|
||||
restoreMode: Binding.RestoreBindingOrValue
|
||||
}
|
||||
Binding on leftPadding {
|
||||
when: rightPanel.contentStackView.currentItem.objectName === "chatPanel"
|
||||
when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName === "chatPanel"
|
||||
value: 0
|
||||
restoreMode: Binding.RestoreBindingOrValue
|
||||
}
|
||||
Binding on rightPadding {
|
||||
when: rightPanel.contentStackView.currentItem.objectName == "chatPanel"
|
||||
when: rightPanel.contentLoader.item && rightPanel.contentLoader.item.objectName == "chatPanel"
|
||||
value: 0
|
||||
restoreMode: Binding.RestoreBindingOrValue
|
||||
}
|
||||
Binding on rightPadding {
|
||||
when: rightPanel.contentStackView.currentItem.objectName == "participantListView"
|
||||
value: Math.round(10 * DefaultStyle.dp)
|
||||
Connections {
|
||||
target: rightPanel.contentLoader
|
||||
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 {
|
||||
id: numericPadContainer
|
||||
|
|
@ -646,10 +714,13 @@ AbstractWindow {
|
|||
|
||||
Component {
|
||||
id: callTransferPanel
|
||||
Control.Control {
|
||||
objectName: "callTransferPanel"
|
||||
width: parent.width
|
||||
NewCallForm {
|
||||
id: newCallForm
|
||||
//: "Transférer %1 à…"
|
||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_transfer_current_call_title").arg(mainWindow.call.core.remoteName)
|
||||
width: parent.width
|
||||
height: rightPanel.contentItemHeight
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
|
|
@ -699,13 +770,16 @@ AbstractWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: newCallPanel
|
||||
Control.Control {
|
||||
objectName: "newCallPanel"
|
||||
width: parent.width
|
||||
NewCallForm {
|
||||
id: newCallForm
|
||||
objectName: "newCallPanel"
|
||||
//: "Nouvel appel"
|
||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_start_new_call")
|
||||
width: parent.width
|
||||
height: rightPanel.contentItemHeight
|
||||
groupCallVisible: false
|
||||
searchBarColor: DefaultStyle.grey_0
|
||||
searchBarBorderColor: DefaultStyle.grey_200
|
||||
|
|
@ -740,23 +814,27 @@ AbstractWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: dialerPanel
|
||||
Item {
|
||||
Control.Control {
|
||||
id: dialerPanelContent
|
||||
//: "Pavé numérique"
|
||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_show_dialer")
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
objectName: "dialerPanel"
|
||||
width: parent.width
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
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 {
|
||||
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
|
||||
anchors.rightMargin: Math.round(10 * DefaultStyle.dp)
|
||||
anchors.bottom: numPad.top
|
||||
anchors.bottomMargin: Math.round(41 * DefaultStyle.dp)
|
||||
id: searchBar
|
||||
height: Math.round(45 * DefaultStyle.dp)
|
||||
magnifierVisible: false
|
||||
color: DefaultStyle.grey_0
|
||||
borderColor: DefaultStyle.grey_200
|
||||
|
|
@ -767,11 +845,10 @@ AbstractWindow {
|
|||
}
|
||||
NumericPad {
|
||||
id: numPad
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Math.round(18 * DefaultStyle.dp)
|
||||
currentCall: callsModel.currentCall
|
||||
lastRowVisible: false
|
||||
anchors.bottomMargin: Math.round(18 * DefaultStyle.dp)
|
||||
onLaunchCall: {
|
||||
UtilsCpp.createCall(dialerTextInput.text)
|
||||
}
|
||||
|
|
@ -779,11 +856,13 @@ AbstractWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: changeLayoutPanel
|
||||
ChangeLayoutForm {
|
||||
//: "Modifier la disposition"
|
||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("call_action_change_layout")
|
||||
objectName: "changeLayoutPanel"
|
||||
width: parent.width
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
|
|
@ -797,12 +876,7 @@ AbstractWindow {
|
|||
Component {
|
||||
id: callListPanel
|
||||
ColumnLayout {
|
||||
Control.StackView.onActivated: {
|
||||
//: "Liste d'appel"
|
||||
rightPanel.headerTitleText = qsTr("call_action_go_to_calls_list")
|
||||
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(
|
||||
rightPanel)
|
||||
}
|
||||
objectName: "callListPanel"
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
|
|
@ -848,74 +922,79 @@ AbstractWindow {
|
|||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel.contentLoader
|
||||
function onItemChanged() {
|
||||
if (rightPanel.contentLoader.item.objectName === "callListPanel") {
|
||||
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: chatPanel
|
||||
Item {
|
||||
id: chatPanelContent
|
||||
Control.Control {
|
||||
objectName: "chatPanel"
|
||||
Control.StackView.onActivated: {
|
||||
rightPanel.customHeaderButtons = chatView.callHeaderContent
|
||||
rightPanel.headerTitleText = ""
|
||||
}
|
||||
width: parent.width
|
||||
SelectedChatView {
|
||||
id: chatView
|
||||
width: parent.width
|
||||
height: rightPanel.contentItemHeight
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
}
|
||||
SelectedChatView {
|
||||
id: chatView
|
||||
anchors.fill: parent
|
||||
call: mainWindow.call
|
||||
property var chatObj: UtilsCpp.getCurrentCallChat(mainWindow.call)
|
||||
chat: chatObj ? chatObj.value : null
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel.contentLoader
|
||||
function onItemChanged() {
|
||||
if (rightPanel.contentLoader.item.objectName === "chatPanel") {
|
||||
rightPanel.customHeaderButtons = chatView.callHeaderContent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: settingsPanel
|
||||
Item {
|
||||
Control.StackView.onActivated: {
|
||||
//: "Paramètres"
|
||||
rightPanel.headerTitleText = qsTr("call_action_go_to_settings")
|
||||
}
|
||||
MultimediaSettings {
|
||||
id: inSettingsPanel
|
||||
objectName: "settingsPanel"
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
}
|
||||
MultimediaSettings {
|
||||
id: inSettingsPanel
|
||||
call: mainWindow.call
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Math.round(16 * DefaultStyle.dp)
|
||||
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
|
||||
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
|
||||
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
|
||||
}
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: screencastPanel
|
||||
Item {
|
||||
//: "Partage de votre écran"
|
||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("conference_action_screen_sharing")
|
||||
Control.Control {
|
||||
objectName: "screencastPanel"
|
||||
width: parent.width
|
||||
height: contentChildren.height
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
event.accepted = true
|
||||
}
|
||||
ScreencastSettings {
|
||||
anchors.fill: parent
|
||||
contentItem: ScreencastSettings {
|
||||
id: screencastsettings
|
||||
anchors.topMargin: Math.round(16 * DefaultStyle.dp)
|
||||
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
|
||||
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
|
||||
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
|
||||
width: parent.width
|
||||
call: mainWindow.call
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: participantListPanel
|
||||
Item {
|
||||
Control.Control {
|
||||
width: parent.width
|
||||
objectName: "participantListPanel"
|
||||
Keys.onEscapePressed: event => {
|
||||
rightPanel.visible = false
|
||||
|
|
@ -923,13 +1002,14 @@ AbstractWindow {
|
|||
}
|
||||
Control.StackView {
|
||||
id: participantsStack
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
|
||||
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
|
||||
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
|
||||
width: parent.width
|
||||
height: rightPanel.contentItemHeight
|
||||
// anchors.fill: parent
|
||||
// anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
|
||||
// anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
|
||||
// anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
|
||||
initialItem: participantListComp
|
||||
onCurrentItemChanged: rightPanel.headerStack.currentIndex
|
||||
= currentItem.Control.StackView.index
|
||||
onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
|
||||
property list<string> selectedParticipants
|
||||
|
||||
Connections {
|
||||
|
|
@ -945,6 +1025,8 @@ AbstractWindow {
|
|||
id: participantList
|
||||
objectName: "participantListView"
|
||||
call: mainWindow.call
|
||||
height: contentHeight
|
||||
width: parent.width
|
||||
rightMargin: 0
|
||||
Component {
|
||||
id: headerbutton
|
||||
|
|
@ -963,7 +1045,8 @@ AbstractWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
Control.StackView.onActivated: {
|
||||
|
||||
onVisibleChanged: if (visible) {
|
||||
rightPanel.customHeaderButtons = headerbutton.createObject(rightPanel)
|
||||
//: "Participants (%1)"
|
||||
rightPanel.headerTitleText = qsTr("conference_participants_list_title").arg(count)
|
||||
|
|
@ -982,8 +1065,7 @@ AbstractWindow {
|
|||
Connections {
|
||||
target: rightPanel
|
||||
function onValidateRequested() {
|
||||
participantList.model.addAddresses(
|
||||
participantsStack.selectedParticipants)
|
||||
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||
participantsStack.pop()
|
||||
}
|
||||
}
|
||||
|
|
@ -993,6 +1075,8 @@ AbstractWindow {
|
|||
id: addParticipantComp
|
||||
AddParticipantsForm {
|
||||
id: addParticipantLayout
|
||||
// height: childrenRect.height
|
||||
// width: parent.width
|
||||
searchBarColor: DefaultStyle.grey_0
|
||||
searchBarBorderColor: DefaultStyle.grey_200
|
||||
onSelectedParticipantsCountChanged: {
|
||||
|
|
@ -1005,6 +1089,8 @@ AbstractWindow {
|
|||
if (participantsStack.currentItem == addParticipantLayout) {
|
||||
rightPanel.headerTitleText = qsTr("meeting_schedule_add_participants_title")
|
||||
rightPanel.headerSubtitleText = qsTr("group_call_participant_selected", '', addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length)
|
||||
} else {
|
||||
rightPanel.headerSubtitleText = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1018,10 +1104,7 @@ AbstractWindow {
|
|||
EncryptionSettings {
|
||||
objectName: "encryptionPanel"
|
||||
call: mainWindow.call
|
||||
Control.StackView.onActivated: {
|
||||
//: Chiffrement
|
||||
rightPanel.headerTitleText = qsTr("call_encryption_title")
|
||||
}
|
||||
width: parent.width
|
||||
onEncryptionValidationRequested: zrtpValidation.open()
|
||||
}
|
||||
}
|
||||
|
|
@ -1029,10 +1112,7 @@ AbstractWindow {
|
|||
id: statsPanel
|
||||
CallStatistics {
|
||||
objectName: "statsPanel"
|
||||
Control.StackView.onActivated: {
|
||||
//: Statistiques
|
||||
rightPanel.headerTitleText = qsTr("call_stats_title")
|
||||
}
|
||||
width: parent.width
|
||||
call: mainWindow.call
|
||||
}
|
||||
}
|
||||
|
|
@ -1072,7 +1152,6 @@ AbstractWindow {
|
|||
target: rightPanel
|
||||
function onVisibleChanged() {
|
||||
if (!rightPanel.visible) {
|
||||
console.log("unceck settings button")
|
||||
waitingRoomIn.settingsButtonChecked = false
|
||||
}
|
||||
}
|
||||
|
|
@ -1216,7 +1295,7 @@ AbstractWindow {
|
|||
contentImageColor: DefaultStyle.grey_0
|
||||
//: "Transférer l'appel"
|
||||
ToolTip.text: qsTr("call_action_transfer_call")
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
console.log("checked transfer changed", checked)
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
|
|
@ -1225,13 +1304,6 @@ AbstractWindow {
|
|||
rightPanel.visible = false
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel
|
||||
function onVisibleChanged() {
|
||||
if (!rightPanel.visible)
|
||||
transferCallButton.checked = false
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckableButton {
|
||||
id: newCallButton
|
||||
|
|
@ -1243,7 +1315,7 @@ AbstractWindow {
|
|||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
//: "Initier un nouvel appel"
|
||||
ToolTip.text: qsTr("call_action_start_new_call_hint")
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
console.log("checked newcall changed", checked)
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
|
|
@ -1252,13 +1324,6 @@ AbstractWindow {
|
|||
rightPanel.visible = false
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel
|
||||
function onVisibleChanged() {
|
||||
if (!rightPanel.visible)
|
||||
newCallButton.checked = false
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckableButton {
|
||||
id: callListButton
|
||||
|
|
@ -1270,7 +1335,7 @@ AbstractWindow {
|
|||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
//: "Afficher la liste d'appels"
|
||||
ToolTip.text: qsTr("call_display_call_list_hint")
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
rightPanel.replace(callListPanel)
|
||||
|
|
@ -1278,13 +1343,6 @@ AbstractWindow {
|
|||
rightPanel.visible = false
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel
|
||||
function onVisibleChanged() {
|
||||
if (!rightPanel.visible)
|
||||
newCallButton.checked = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
|
|
@ -1336,6 +1394,7 @@ AbstractWindow {
|
|||
!mainWindow.call.core.microphoneMuted)
|
||||
}
|
||||
CheckableButton {
|
||||
id: screencastPanelButton
|
||||
iconUrl: AppIcons.screencast
|
||||
visible: !!mainWindow.conference
|
||||
//: Partager l'écran…
|
||||
|
|
@ -1344,7 +1403,7 @@ AbstractWindow {
|
|||
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
|
||||
icon.width: Math.round(32 * DefaultStyle.dp)
|
||||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
rightPanel.replace(screencastPanel)
|
||||
|
|
@ -1354,6 +1413,7 @@ AbstractWindow {
|
|||
}
|
||||
}
|
||||
CheckableButton {
|
||||
id: chatPanelButton
|
||||
iconUrl: AppIcons.chatTeardropText
|
||||
//: Open chat…
|
||||
ToolTip.text: qsTr("call_open_chat_hint")
|
||||
|
|
@ -1361,7 +1421,7 @@ AbstractWindow {
|
|||
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
|
||||
icon.width: Math.round(32 * DefaultStyle.dp)
|
||||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
rightPanel.replace(chatPanel)
|
||||
|
|
@ -1401,7 +1461,7 @@ AbstractWindow {
|
|||
Layout.preferredHeight: Math.round(55 * DefaultStyle.dp)
|
||||
icon.width: Math.round(32 * DefaultStyle.dp)
|
||||
icon.height: Math.round(32 * DefaultStyle.dp)
|
||||
onCheckedChanged: {
|
||||
onToggled: {
|
||||
if (checked) {
|
||||
rightPanel.visible = true
|
||||
rightPanel.replace(participantListPanel)
|
||||
|
|
@ -1409,11 +1469,6 @@ AbstractWindow {
|
|||
rightPanel.visible = false
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: rightPanel
|
||||
onVisibleChanged: if (!rightPanel.visible)
|
||||
participantListButton.checked = false
|
||||
}
|
||||
}
|
||||
PopupButton {
|
||||
id: moreOptionsButton
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue