diff --git a/linphone-desktop/assets/languages/en.ts b/linphone-desktop/assets/languages/en.ts
index 11bc0c18d..7b713b97d 100644
--- a/linphone-desktop/assets/languages/en.ts
+++ b/linphone-desktop/assets/languages/en.ts
@@ -833,7 +833,7 @@ your friend's SIP address or username.
MessageMenu
copy
-
+ Copy
@@ -1362,23 +1362,23 @@ your friend's SIP address or username.
ZrtpTokenAuthentication
- Confirm the following SAS with peer:
- Confirm the following SAS with peer:
+ confirmSas
+ Confirm the following SAS with peer.
- Say:
+ codeA
Say:
- Your correspondent should say:
+ codeB
Your correspondent should say:
- Deny
+ deny
DENY
- Accept
+ accept
ACCEPT
diff --git a/linphone-desktop/assets/languages/fr.ts b/linphone-desktop/assets/languages/fr.ts
index b3c684d47..b0f293d2d 100644
--- a/linphone-desktop/assets/languages/fr.ts
+++ b/linphone-desktop/assets/languages/fr.ts
@@ -1361,24 +1361,24 @@ un chat ou ajouter un contact.
ZrtpTokenAuthentication
- Confirm the following SAS with peer:
- Confirmez le SAS suivant avec votre interlocuteur :
+ confirmSas
+ Confirmez le SAS suivant avec votre interlocuteur.
- Say:
+ codeA
Dites :
- Your correspondent should say:
+ codeB
Votre interlocuteur devrait dire :
- Deny
- REJETER
+ deny
+ REFUSER
- Accept
- VALIDER
+ accept
+ ACCEPTER
diff --git a/linphone-desktop/ui/views/App/Calls/Incall.js b/linphone-desktop/ui/views/App/Calls/Incall.js
index afcf0be91..2f3f291ed 100644
--- a/linphone-desktop/ui/views/App/Calls/Incall.js
+++ b/linphone-desktop/ui/views/App/Calls/Incall.js
@@ -9,7 +9,7 @@
// =============================================================================
function computeAvatarSize (maxSize) {
- var height = zrtp.visible ? container.height - zrtp.height : container.height
+ var height = container.height
var width = container.width
var size = height < maxSize && height > 0 ? height : maxSize
diff --git a/linphone-desktop/ui/views/App/Calls/Incall.qml b/linphone-desktop/ui/views/App/Calls/Incall.qml
index f90ab8405..7330f04e1 100644
--- a/linphone-desktop/ui/views/App/Calls/Incall.qml
+++ b/linphone-desktop/ui/views/App/Calls/Incall.qml
@@ -249,8 +249,19 @@ Rectangle {
}
}
+ // -------------------------------------------------------------------------
+ // Zrtp.
+ // -------------------------------------------------------------------------
+
ZrtpTokenAuthentication {
id: zrtp
+
+ Layout.fillWidth: true
+ Layout.margins: CallStyle.container.margins
+ Layout.preferredHeight: CallStyle.zrtpArea.height
+
+ call: incall.call
+ z: Constants.zPopup
}
// -------------------------------------------------------------------------
diff --git a/linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml b/linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
index da07ebb3e..8e7103e19 100644
--- a/linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
+++ b/linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
@@ -1,96 +1,117 @@
import QtQuick 2.7
-import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import Common 1.0
-import Common.Styles 1.0
-import Linphone 1.0
-import LinphoneUtils 1.0
-import Utils 1.0
import App.Styles 1.0
-Item {
- height: CallStyle.zrtpArea.height
- visible: false
+// =============================================================================
+
+ColumnLayout {
+ id: zrtp
+
+ // ---------------------------------------------------------------------------
+
+ property var call
+
+ // ---------------------------------------------------------------------------
+
+ visible: false
+
+ // ---------------------------------------------------------------------------
+ // Main text.
+ // ---------------------------------------------------------------------------
+
+ Text {
Layout.fillWidth: true
- anchors.top: container.bottom
- Layout.margins: CallStyle.container.margins
- GridLayout {
- anchors.centerIn: parent
- columns: 1
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
- Text {
- Layout.fillWidth: true
- anchors.horizontalCenter: parent.horizontalCenter
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: qsTr("Confirm the following SAS with peer:")
- elide: Text.ElideRight
- font.pointSize: CallStyle.zrtpArea.fontSize
- font.bold: true
- color: Colors.j
- }
+ text: qsTr('confirmSas')
- RowLayout {
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: CallStyle.zrtpArea.vu.spacing
- Layout.fillWidth: true
+ color: CallStyle.zrtpArea.text.colorA
+ elide: Text.ElideRight
- Text {
- text: qsTr("Say:")
- font.pointSize: CallStyle.zrtpArea.fontSize
- color: Colors.j
- }
-
- Text {
- text: incall.call.localSAS
- font.pointSize: CallStyle.zrtpArea.fontSize
- font.bold: true
- color: Colors.i
- }
-
- Text {
- text: "-"
- font.pointSize: CallStyle.zrtpArea.fontSize
- color: Colors.j
- }
-
- Text {
- text: qsTr("Your correspondent should say:")
- font.pointSize: CallStyle.zrtpArea.fontSize
- color: Colors.j
- }
-
- Text {
- text: incall.call.remoteSAS
- font.pointSize: CallStyle.zrtpArea.fontSize
- font.bold: true
- color: Colors.i
- }
- }
-
- RowLayout {
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: CallStyle.zrtpArea.vu.spacing
- Layout.fillWidth: true
-
- TextButtonA {
- text: qsTr('Deny')
- onClicked: {
- zrtp.visible = false
- incall.call.verifyAuthenticationToken(false)
- }
- }
-
- TextButtonB {
- text: qsTr('Accept')
- onClicked: {
- zrtp.visible = false
- incall.call.verifyAuthenticationToken(true)
- }
- }
- }
+ font {
+ bold: true
+ pointSize: CallStyle.zrtpArea.text.fontSize
}
-}
\ No newline at end of file
+ }
+
+ // ---------------------------------------------------------------------------
+ // Rules.
+ // ---------------------------------------------------------------------------
+
+ Row {
+ Layout.alignment: Qt.AlignHCenter
+
+ spacing: CallStyle.zrtpArea.text.wordsSpacing
+
+ Text {
+ color: CallStyle.zrtpArea.text.colorA
+ font.pointSize: CallStyle.zrtpArea.text.fontSize
+ text: qsTr('codeA')
+ }
+
+ Text {
+ color: CallStyle.zrtpArea.text.colorB
+
+ font {
+ bold: true
+ pointSize: CallStyle.zrtpArea.text.fontSize
+ }
+
+ text: zrtp.call.localSAS
+ }
+
+ Text {
+ color: CallStyle.zrtpArea.text.colorA
+ font.pointSize: CallStyle.zrtpArea.text.fontSize
+ text: '-'
+ }
+
+ Text {
+ color: CallStyle.zrtpArea.text.colorA
+ font.pointSize: CallStyle.zrtpArea.text.fontSize
+ text: qsTr('codeB')
+ }
+
+ Text {
+ color: CallStyle.zrtpArea.text.colorB
+
+ font {
+ bold: true
+ pointSize: CallStyle.zrtpArea.text.fontSize
+ }
+
+ text: zrtp.call.remoteSAS
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+ // Buttons.
+ // ---------------------------------------------------------------------------
+
+ Row {
+ Layout.alignment: Qt.AlignHCenter
+
+ spacing: CallStyle.zrtpArea.buttons.spacing
+
+ TextButtonA {
+ text: qsTr('deny')
+ onClicked: {
+ zrtp.visible = false
+ zrtp.call.verifyAuthenticationToken(false)
+ }
+ }
+
+ TextButtonB {
+ text: qsTr('accept')
+ onClicked: {
+ zrtp.visible = false
+ zrtp.call.verifyAuthenticationToken(true)
+ }
+ }
+ }
+}
diff --git a/linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml b/linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
index 2b837dcdf..89846bb79 100644
--- a/linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
+++ b/linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
@@ -79,10 +79,16 @@ QtObject {
property QtObject zrtpArea: QtObject {
property int height: 50
- property int fontSize: 12
- property QtObject vu: QtObject {
- property int spacing: 5
+ property QtObject buttons: QtObject {
+ property int spacing: 10
+ }
+
+ property QtObject text: QtObject {
+ property color colorA: Colors.j
+ property color colorB: Colors.i
+ property int fontSize: 12
+ property int wordsSpacing: 5
}
}
}