fix #LINQT-1370 + ui call end text
This commit is contained in:
parent
a780825c12
commit
12b73b9c0c
3 changed files with 18 additions and 26 deletions
|
|
@ -41,14 +41,12 @@ Item {
|
||||||
anchors.topMargin: 25 * DefaultStyle.dp
|
anchors.topMargin: 25 * DefaultStyle.dp
|
||||||
z: 1
|
z: 1
|
||||||
visible: callState === LinphoneEnums.CallState.End || callState === LinphoneEnums.CallState.Error || callState === LinphoneEnums.CallState.Released
|
visible: callState === LinphoneEnums.CallState.End || callState === LinphoneEnums.CallState.Error || callState === LinphoneEnums.CallState.Released
|
||||||
text: callState === LinphoneEnums.CallState.End
|
text: mainItem.conference
|
||||||
? mainItem.conference
|
|
||||||
? qsTr("Vous avez quitté la conférence")
|
? qsTr("Vous avez quitté la conférence")
|
||||||
: mainItem.callStarted
|
: mainItem.callStarted
|
||||||
? mainItem.callTerminatedByUser
|
? mainItem.callTerminatedByUser
|
||||||
? qsTr("Vous avez terminé l'appel")
|
? qsTr("Vous avez terminé l'appel")
|
||||||
: qsTr("Votre correspondant a terminé l'appel")
|
: qsTr("Votre correspondant a terminé l'appel")
|
||||||
: call.core.lastErrorMessage
|
|
||||||
: call && call.core.lastErrorMessage || ""
|
: call && call.core.lastErrorMessage || ""
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
|
|
|
||||||
|
|
@ -76,33 +76,43 @@ ListView {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||||
Layout.leftMargin: 14 * DefaultStyle.dp
|
Layout.leftMargin: 14 * DefaultStyle.dp
|
||||||
|
popup.rightPadding: 10 * DefaultStyle.dp
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 16 * DefaultStyle.dp
|
||||||
width: childrenRect.width
|
|
||||||
MenuButton {
|
MenuButton {
|
||||||
id: pausingButton
|
id: pausingButton
|
||||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
KeyNavigation.up: endCallButton
|
KeyNavigation.up: endCallButton
|
||||||
KeyNavigation.down: endCallButton
|
KeyNavigation.down: endCallButton
|
||||||
Layout.preferredWidth: implicitWidth
|
Layout.preferredWidth: icon.width + spacing + pauseMeter.advanceWidth + leftPadding + rightPadding
|
||||||
Layout.preferredHeight: icon.height
|
|
||||||
icon.source: modelData.core.state === LinphoneEnums.CallState.Paused
|
icon.source: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
? AppIcons.phone : AppIcons.pause
|
? AppIcons.phone : AppIcons.pause
|
||||||
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
text: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
||||||
|
TextMetrics {
|
||||||
|
id: pauseMeter
|
||||||
|
text: pausingButton.text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
id: endCallButton
|
id: endCallButton
|
||||||
onClicked: mainWindow.endCall(modelData)
|
onClicked: {
|
||||||
|
mainWindow.callTerminatedByUser = true
|
||||||
|
mainWindow.endCall(modelData)
|
||||||
|
}
|
||||||
KeyNavigation.up: pausingButton
|
KeyNavigation.up: pausingButton
|
||||||
KeyNavigation.down: pausingButton
|
KeyNavigation.down: pausingButton
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: icon.width + spacing + endMeter.advanceWidth + leftPadding + rightPadding
|
||||||
icon.source: AppIcons.endCall
|
icon.source: AppIcons.endCall
|
||||||
contentImageColor: DefaultStyle.danger_500main
|
contentImageColor: DefaultStyle.danger_500main
|
||||||
textColor: DefaultStyle.danger_500main
|
textColor: DefaultStyle.danger_500main
|
||||||
text: qsTr("Terminer l'appel")
|
text: qsTr("Terminer l'appel")
|
||||||
|
TextMetrics {
|
||||||
|
id: endMeter
|
||||||
|
text: endCallButton.text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1245,7 +1245,6 @@ AbstractWindow {
|
||||||
: DefaultStyle.grey_600
|
: DefaultStyle.grey_600
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
popup.x: width/2
|
|
||||||
Connections {
|
Connections {
|
||||||
target: moreOptionsButton.popup
|
target: moreOptionsButton.popup
|
||||||
function onOpened() {
|
function onOpened() {
|
||||||
|
|
@ -1258,10 +1257,7 @@ AbstractWindow {
|
||||||
|
|
||||||
MenuButton {
|
MenuButton {
|
||||||
visible: mainWindow.conference
|
visible: mainWindow.conference
|
||||||
Layout.fillWidth: true
|
|
||||||
icon.source: AppIcons.squaresFour
|
icon.source: AppIcons.squaresFour
|
||||||
icon.width: 32 * DefaultStyle.dp
|
|
||||||
icon.height: 32 * DefaultStyle.dp
|
|
||||||
text: qsTr("Modifier la disposition")
|
text: qsTr("Modifier la disposition")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rightPanel.visible = true
|
rightPanel.visible = true
|
||||||
|
|
@ -1271,10 +1267,7 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
visible: mainWindow.conference
|
visible: mainWindow.conference
|
||||||
Layout.fillWidth: true
|
|
||||||
icon.source: AppIcons.fullscreen
|
icon.source: AppIcons.fullscreen
|
||||||
icon.width: 32 * DefaultStyle.dp
|
|
||||||
icon.height: 32 * DefaultStyle.dp
|
|
||||||
text: qsTr("Mode Plein écran")
|
text: qsTr("Mode Plein écran")
|
||||||
checkable: true
|
checkable: true
|
||||||
onToggled: {
|
onToggled: {
|
||||||
|
|
@ -1289,7 +1282,6 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
icon.source: AppIcons.callList
|
icon.source: AppIcons.callList
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Liste d'appel")
|
text: qsTr("Liste d'appel")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rightPanel.visible = true
|
rightPanel.visible = true
|
||||||
|
|
@ -1300,7 +1292,6 @@ AbstractWindow {
|
||||||
MenuButton {
|
MenuButton {
|
||||||
icon.source: AppIcons.dialer
|
icon.source: AppIcons.dialer
|
||||||
text: qsTr("Dialer")
|
text: qsTr("Dialer")
|
||||||
Layout.fillWidth: true
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rightPanel.visible = true
|
rightPanel.visible = true
|
||||||
rightPanel.replace(dialerPanel)
|
rightPanel.replace(dialerPanel)
|
||||||
|
|
@ -1312,8 +1303,6 @@ AbstractWindow {
|
||||||
visible: mainWindow.call && !mainWindow.conference && !SettingsCpp.disableCallRecordings
|
visible: mainWindow.call && !mainWindow.conference && !SettingsCpp.disableCallRecordings
|
||||||
enabled: mainWindow.call && mainWindow.call.core.recordable
|
enabled: mainWindow.call && mainWindow.call.core.recordable
|
||||||
icon.source: AppIcons.recordFill
|
icon.source: AppIcons.recordFill
|
||||||
icon.width: 32 * DefaultStyle.dp
|
|
||||||
icon.height: 32 * DefaultStyle.dp
|
|
||||||
checked: mainWindow.call && mainWindow.call.core.recording
|
checked: mainWindow.call && mainWindow.call.core.recording
|
||||||
contentImageColor: down
|
contentImageColor: down
|
||||||
? DefaultStyle.main1_500_main
|
? DefaultStyle.main1_500_main
|
||||||
|
|
@ -1326,7 +1315,6 @@ AbstractWindow {
|
||||||
:mainWindow.call && mainWindow.call.core.recording
|
:mainWindow.call && mainWindow.call.core.recording
|
||||||
? DefaultStyle.danger_500main
|
? DefaultStyle.danger_500main
|
||||||
: DefaultStyle.main2_500main
|
: DefaultStyle.main2_500main
|
||||||
Layout.fillWidth: true
|
|
||||||
onToggled: {
|
onToggled: {
|
||||||
if (mainWindow.call)
|
if (mainWindow.call)
|
||||||
if (mainWindow.call.core.recording) mainWindow.call.core.lStopRecording()
|
if (mainWindow.call.core.recording) mainWindow.call.core.lStopRecording()
|
||||||
|
|
@ -1336,8 +1324,6 @@ AbstractWindow {
|
||||||
MenuButton {
|
MenuButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
icon.source: !mainWindow.call || mainWindow.call.core.speakerMuted ? AppIcons.speakerSlash : AppIcons.speaker
|
icon.source: !mainWindow.call || mainWindow.call.core.speakerMuted ? AppIcons.speakerSlash : AppIcons.speaker
|
||||||
icon.width: 32 * DefaultStyle.dp
|
|
||||||
icon.height: 32 * DefaultStyle.dp
|
|
||||||
contentImageColor: down
|
contentImageColor: down
|
||||||
? DefaultStyle.main1_500_main
|
? DefaultStyle.main1_500_main
|
||||||
: mainWindow.call && mainWindow.call.core.speakerMuted
|
: mainWindow.call && mainWindow.call.core.speakerMuted
|
||||||
|
|
@ -1349,13 +1335,11 @@ AbstractWindow {
|
||||||
:mainWindow.call && mainWindow.call.core.speakerMuted
|
:mainWindow.call && mainWindow.call.core.speakerMuted
|
||||||
? DefaultStyle.danger_500main
|
? DefaultStyle.danger_500main
|
||||||
: DefaultStyle.main2_500main
|
: DefaultStyle.main2_500main
|
||||||
Layout.fillWidth: true
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (mainWindow.call) mainWindow.call.core.lSetSpeakerMuted(!mainWindow.call.core.speakerMuted)
|
if (mainWindow.call) mainWindow.call.core.lSetSpeakerMuted(!mainWindow.call.core.speakerMuted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
Layout.fillWidth: true
|
|
||||||
icon.source: AppIcons.settings
|
icon.source: AppIcons.settings
|
||||||
text: qsTr("Paramètres")
|
text: qsTr("Paramètres")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue