diff --git a/Linphone/data/image/check-square-offset.svg b/Linphone/data/image/check-square-offset.svg
index 518a1dc54..becc7d906 100644
--- a/Linphone/data/image/check-square-offset.svg
+++ b/Linphone/data/image/check-square-offset.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Linphone/data/image/copyright.svg b/Linphone/data/image/copyright.svg
new file mode 100644
index 000000000..4bd03e64a
--- /dev/null
+++ b/Linphone/data/image/copyright.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt
index 22f4368c7..6277c5cb6 100644
--- a/Linphone/view/CMakeLists.txt
+++ b/Linphone/view/CMakeLists.txt
@@ -34,6 +34,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
view/Control/Display/BusyIndicator.qml
view/Control/Display/EffectImage.qml
+ view/Control/Display/Flickable.qml
view/Control/Display/TemporaryText.qml
view/Control/Display/ProgressBar.qml
view/Control/Display/RoundedPane.qml
diff --git a/Linphone/view/Control/Container/FormItemLayout.qml b/Linphone/view/Control/Container/FormItemLayout.qml
index 76f95e515..61faa1954 100644
--- a/Linphone/view/Control/Container/FormItemLayout.qml
+++ b/Linphone/view/Control/Container/FormItemLayout.qml
@@ -1,5 +1,4 @@
import QtQuick
-import QtQuick.Controls.Basic as Control
import QtQuick.Layouts
import QtQuick.Effects
import Linphone
@@ -41,8 +40,8 @@ FocusScope{
}
Item {
- Layout.preferredHeight: contentItem.height
- Layout.preferredWidth: contentItem.width
+ Layout.preferredHeight: childrenRect.height
+ Layout.preferredWidth: childrenRect.width
Item {
id: contentItem
height: childrenRect.height
@@ -52,7 +51,6 @@ FocusScope{
id: errorText
anchors.top: contentItem.bottom
color: DefaultStyle.danger_500main
- Layout.preferredWidth: implicitWidth
}
}
diff --git a/Linphone/view/Control/Display/TemporaryText.qml b/Linphone/view/Control/Display/TemporaryText.qml
index d6f88778d..768698ccb 100644
--- a/Linphone/view/Control/Display/TemporaryText.qml
+++ b/Linphone/view/Control/Display/TemporaryText.qml
@@ -7,23 +7,21 @@ import Linphone
Text {
id: mainItem
color: DefaultStyle.danger_500main
- visible: false
+ visible: text.length > 0
function clear() {
autoHideErrorMessage.stop()
text = ""
- mainItem.visible = false
}
function setText(text) {
if (text.length === 0) {
clear()
} else {
- mainItem.visible = true
mainItem.text = text
}
}
font {
- pixelSize: 12 * DefaultStyle.dp
- weight: 300 * DefaultStyle.dp
+ pixelSize: 13 * DefaultStyle.dp
+ weight: 600 * DefaultStyle.dp
}
Timer {
id: autoHideErrorMessage
diff --git a/Linphone/view/Control/Form/Login/LoginForm.qml b/Linphone/view/Control/Form/Login/LoginForm.qml
index d285659c6..222f5230f 100644
--- a/Linphone/view/Control/Form/Login/LoginForm.qml
+++ b/Linphone/view/Control/Form/Login/LoginForm.qml
@@ -6,7 +6,7 @@ import ConstantsCpp 1.0
ColumnLayout {
id: mainItem
- spacing: 25 * DefaultStyle.dp
+ spacing: 10 * DefaultStyle.dp
signal connectionSucceed()
FormItemLayout {
@@ -35,23 +35,23 @@ ColumnLayout {
Layout.preferredHeight: 49 * DefaultStyle.dp
hidden: true
}
- }
-
- TemporaryText {
- id: errorText
- anchors.top: password.bottom
- Connections {
- target: LoginPageCpp
- function onErrorMessageChanged() {
- errorText.setText(LoginPageCpp.errorMessage)
- }
- function onRegistrationStateChanged() {
- if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) {
- mainItem.connectionSucceed()
+ TemporaryText {
+ id: errorText
+ anchors.bottom: parent.bottom
+ Connections {
+ target: LoginPageCpp
+ function onErrorMessageChanged() {
+ errorText.setText(LoginPageCpp.errorMessage)
+ }
+ function onRegistrationStateChanged() {
+ if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) {
+ mainItem.connectionSucceed()
+ }
}
}
}
}
+
}
RowLayout {
@@ -101,6 +101,7 @@ ColumnLayout {
function trigger() {
username.errorMessage = ""
password.errorMessage = ""
+ errorText.text = ""
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0) {
if (usernameEdit.text.length == 0)
diff --git a/Linphone/view/Control/Popup/Dialog/Dialog.qml b/Linphone/view/Control/Popup/Dialog/Dialog.qml
index 457849eb8..b669a3678 100644
--- a/Linphone/view/Control/Popup/Dialog/Dialog.qml
+++ b/Linphone/view/Control/Popup/Dialog/Dialog.qml
@@ -16,6 +16,7 @@ Popup {
underlineColor: DefaultStyle.main1_500_main
radius: title.length === 0 ? 16 * DefaultStyle.dp : 0
property string title
+ property var titleColor: DefaultStyle.main2_600
property string text
property string details
property string firstButtonText: firstButtonAccept ? qsTr("Oui") : qsTr("Annuler")
@@ -52,7 +53,7 @@ Popup {
Layout.fillWidth: true
visible: text.length != 0
text: mainItem.title
- color: DefaultStyle.main1_500_main
+ color: mainItem.titleColor
font {
pixelSize: 22 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp
diff --git a/Linphone/view/Page/Form/Login/LoginPage.qml b/Linphone/view/Page/Form/Login/LoginPage.qml
index 079afa882..656ead44c 100644
--- a/Linphone/view/Page/Form/Login/LoginPage.qml
+++ b/Linphone/view/Page/Form/Login/LoginPage.qml
@@ -84,11 +84,6 @@ LoginLayout {
anchors.leftMargin: 127 * DefaultStyle.dp
anchors.topMargin: 70 * DefaultStyle.dp
anchors.bottom: parent.bottom
- width: contentWidth
- contentWidth: content.implicitWidth
- contentHeight: content.implicitHeight
- clip: true
- flickableDirection: Flickable.VerticalFlick
ColumnLayout {
id: content
spacing: 0
diff --git a/Linphone/view/Page/Form/Register/RegisterPage.qml b/Linphone/view/Page/Form/Register/RegisterPage.qml
index d4f1f3930..dee1c5ba8 100644
--- a/Linphone/view/Page/Form/Register/RegisterPage.qml
+++ b/Linphone/view/Page/Form/Register/RegisterPage.qml
@@ -16,6 +16,7 @@ LoginLayout {
Connections {
target: RegisterPageCpp
function onErrorInField(field, errorMessage) {
+ console.log("set error message", errorMessage)
if (field == "username") usernameItem.errorMessage = errorMessage
else if (field == "password") pwdItem.errorMessage = errorMessage
else if (field == "phone") phoneNumberInput.errorMessage = errorMessage
@@ -23,6 +24,7 @@ LoginLayout {
else otherErrorText.text = errorMessage
}
function onRegisterNewAccountFailed(errorMessage) {
+ console.log("register failed", errorMessage)
otherErrorText.text = errorMessage
}
}
@@ -77,9 +79,7 @@ LoginLayout {
centerContent: [
ColumnLayout {
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
+ anchors.fill: parent
anchors.topMargin: 51 * DefaultStyle.dp
anchors.leftMargin: 127 * DefaultStyle.dp
anchors.rightMargin: 127 * DefaultStyle.dp
@@ -89,232 +89,239 @@ LoginLayout {
id: bar
model: [qsTr("Register with phone number"), qsTr("Register with email")]
}
- ColumnLayout {
- spacing: 22 * DefaultStyle.dp
+ Flickable {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
ColumnLayout {
- spacing: 24 * DefaultStyle.dp
- RowLayout {
- spacing: 16 * DefaultStyle.dp
- FormItemLayout {
- id: usernameItem
- label: qsTr("Username")
- mandatory: true
- contentItem: TextField {
- id: usernameInput
- Layout.preferredWidth: 346 * DefaultStyle.dp
- backgroundBorderColor: usernameItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ spacing: 22 * DefaultStyle.dp
+ ColumnLayout {
+ spacing: 24 * DefaultStyle.dp
+ RowLayout {
+ spacing: 16 * DefaultStyle.dp
+ FormItemLayout {
+ id: usernameItem
+ label: qsTr("Username")
+ mandatory: true
+ enableErrorText: true
+ contentItem: TextField {
+ id: usernameInput
+ Layout.preferredWidth: 346 * DefaultStyle.dp
+ backgroundBorderColor: usernameItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ }
+ }
+ RowLayout {
+ spacing: 10 * DefaultStyle.dp
+ Layout.alignment: Qt.AlignBottom
+ ComboBox {
+ enabled: false
+ model: [{text:"@sip.linphone.org"}]
+ Layout.preferredWidth: 210 * DefaultStyle.dp
+ Layout.preferredHeight: 49 * DefaultStyle.dp
+ }
+ EffectImage {
+ imageSource: AppIcons.lock
+ colorizationColor: DefaultStyle.main2_600
+ Layout.preferredWidth: 16 * DefaultStyle.dp
+ Layout.preferredHeight: 16 * DefaultStyle.dp
+ }
}
}
+ StackLayout {
+ currentIndex: bar.currentIndex
+ Layout.fillWidth: true
+ PhoneNumberInput {
+ id: phoneNumberInput
+ property string completePhoneNumber: countryCode + phoneNumber
+ label: qsTr("Numéro de téléphone")
+ enableErrorText: true
+ mandatory: true
+ placeholderText: "Phone number"
+ defaultCallingCode: "33"
+ Layout.preferredWidth: 346 * DefaultStyle.dp
+ }
+ FormItemLayout {
+ id: emailItem
+ label: qsTr("Email")
+ mandatory: true
+ enableErrorText: true
+ contentItem: TextField {
+ id: emailInput
+ Layout.preferredWidth: 346 * DefaultStyle.dp
+ backgroundBorderColor: emailItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ }
+ }
+ }
+ ColumnLayout {
+ spacing: 0
+ Layout.preferredHeight: rowlayout.height
+ clip: false
+ RowLayout {
+ id: rowlayout
+ spacing: 16 * DefaultStyle.dp
+ ColumnLayout {
+ spacing: 5 * DefaultStyle.dp
+ FormItemLayout {
+ id: passwordItem
+ label: qsTr("Mot de passe")
+ mandatory: true
+ enableErrorText: true
+ contentItem: TextField {
+ id: pwdInput
+ hidden: true
+ Layout.preferredWidth: 346 * DefaultStyle.dp
+ backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ }
+ }
+ }
+ ColumnLayout {
+ spacing: 5 * DefaultStyle.dp
+ FormItemLayout {
+ label: qsTr("Confirmation mot de passe")
+ mandatory: true
+ enableErrorText: true
+ contentItem: TextField {
+ id: confirmPwdInput
+ hidden: true
+ Layout.preferredWidth: 346 * DefaultStyle.dp
+ backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ }
+ }
+ }
+ }
+ TemporaryText {
+ id: otherErrorText
+ Layout.fillWidth: true
+ Layout.topMargin: 5 * DefaultStyle.dp
+ onTextChanged: console.log("set error", text)
+ }
+ }
+ }
+ // ColumnLayout {
+ // spacing: 18 * DefaultStyle.dp
+ // RowLayout {
+ // spacing: 10 * DefaultStyle.dp
+ // CheckBox {
+ // id: subscribeToNewsletterCheckBox
+ // }
+ // Text {
+ // text: qsTr("Je souhaite souscrire à la newletter Linphone.")
+ // font {
+ // pixelSize: 14 * DefaultStyle.dp
+ // weight: 400 * DefaultStyle.dp
+ // }
+ // MouseArea {
+ // anchors.fill: parent
+ // onClicked: subscribeToNewsletterCheckBox.toggle()
+ // }
+ // }
+ // }
+
RowLayout {
spacing: 10 * DefaultStyle.dp
- Layout.alignment: Qt.AlignBottom
- ComboBox {
- enabled: false
- model: [{text:"@sip.linphone.org"}]
- Layout.preferredWidth: 210 * DefaultStyle.dp
- Layout.preferredHeight: 49 * DefaultStyle.dp
+ CheckBox {
+ id: termsCheckBox
}
- EffectImage {
- imageSource: AppIcons.lock
- colorizationColor: DefaultStyle.main2_600
- Layout.preferredWidth: 16 * DefaultStyle.dp
- Layout.preferredHeight: 16 * DefaultStyle.dp
- }
- }
- }
- StackLayout {
- currentIndex: bar.currentIndex
- Layout.fillWidth: true
- PhoneNumberInput {
- id: phoneNumberInput
- property string completePhoneNumber: countryCode + phoneNumber
- label: qsTr("Numéro de téléphone")
- mandatory: true
- placeholderText: "Phone number"
- defaultCallingCode: "33"
- Layout.preferredWidth: 346 * DefaultStyle.dp
- }
- FormItemLayout {
- id: emailItem
- label: qsTr("Email")
- mandatory: true
- enableErrorText: true
- contentItem: TextField {
- id: emailInput
- Layout.preferredWidth: 346 * DefaultStyle.dp
- backgroundBorderColor: emailItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
- }
- }
- }
- ColumnLayout {
- spacing: 0
- Layout.preferredHeight: rowlayout.height
- clip: false
- RowLayout {
- id: rowlayout
- spacing: 16 * DefaultStyle.dp
- ColumnLayout {
- spacing: 5 * DefaultStyle.dp
- FormItemLayout {
- id: passwordItem
- label: qsTr("Mot de passe")
- mandatory: true
- enableErrorText: true
- contentItem: TextField {
- id: pwdInput
- hidden: true
- Layout.preferredWidth: 346 * DefaultStyle.dp
- backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ RowLayout {
+ spacing: 0
+ Layout.fillWidth: true
+ Text {
+ text: qsTr("J'accepte les ")
+ font {
+ pixelSize: 14 * DefaultStyle.dp
+ weight: 400 * DefaultStyle.dp
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: termsCheckBox.toggle()
}
}
- }
- ColumnLayout {
- spacing: 5 * DefaultStyle.dp
- FormItemLayout {
- label: qsTr("Confirmation mot de passe")
- mandatory: true
- enableErrorText: true
- contentItem: TextField {
- id: confirmPwdInput
- hidden: true
- Layout.preferredWidth: 346 * DefaultStyle.dp
- backgroundBorderColor: passwordItem.errorMessage.length > 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
+ Text {
+ activeFocusOnTab: true
+ font {
+ underline: true
+ pixelSize: 14 * DefaultStyle.dp
+ weight: 400 * DefaultStyle.dp
+ bold: activeFocus
+ }
+ text: qsTr("conditions d’utilisation")
+ Keys.onPressed: (event)=> {
+ if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
+ cguMouseArea.clicked(undefined)
+ event.accepted = true;
+ }
+ }
+ MouseArea {
+ id: cguMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
+ onClicked: Qt.openUrlExternally(ConstantsCpp.CguUrl)
+ }
+ }
+ Text {
+ text: qsTr(" et la ")
+ font {
+ pixelSize: 14 * DefaultStyle.dp
+ weight: 400 * DefaultStyle.dp
+ }
+ }
+ Text {
+ activeFocusOnTab: true
+ font {
+ underline: true
+ pixelSize: 14 * DefaultStyle.dp
+ weight: 400 * DefaultStyle.dp
+ bold: activeFocus
+ }
+ text: qsTr("politique de confidentialité.")
+ Keys.onPressed: (event)=> {
+ if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
+ privateMouseArea.clicked(undefined)
+ event.accepted = true;
+ }
+ }
+ MouseArea {
+ id: privateMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
+ onClicked: Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl)
}
}
}
}
- TemporaryText {
- id: otherErrorText
- Layout.fillWidth: true
- Layout.topMargin: 5 * DefaultStyle.dp
- }
- }
- }
- // ColumnLayout {
- // spacing: 18 * DefaultStyle.dp
- // RowLayout {
- // spacing: 10 * DefaultStyle.dp
- // CheckBox {
- // id: subscribeToNewsletterCheckBox
- // }
- // Text {
- // text: qsTr("Je souhaite souscrire à la newletter Linphone.")
- // font {
- // pixelSize: 14 * DefaultStyle.dp
- // weight: 400 * DefaultStyle.dp
- // }
- // MouseArea {
- // anchors.fill: parent
- // onClicked: subscribeToNewsletterCheckBox.toggle()
- // }
- // }
- // }
-
- RowLayout {
- spacing: 10 * DefaultStyle.dp
- CheckBox {
- id: termsCheckBox
- }
- RowLayout {
- spacing: 0
- Layout.fillWidth: true
- Text {
- text: qsTr("J'accepte les ")
- font {
- pixelSize: 14 * DefaultStyle.dp
- weight: 400 * DefaultStyle.dp
- }
- MouseArea {
- anchors.fill: parent
- onClicked: termsCheckBox.toggle()
- }
+ // }
+ Button {
+ enabled: termsCheckBox.checked
+ leftPadding: 20 * DefaultStyle.dp
+ rightPadding: 20 * DefaultStyle.dp
+ topPadding: 11 * DefaultStyle.dp
+ bottomPadding: 11 * DefaultStyle.dp
+ text: qsTr("Créer")
+ onClicked:{
+ if (usernameInput.text.length === 0) {
+ console.log("ERROR username")
+ usernameItem.errorMessage = qsTr("Veuillez entrer un nom d'utilisateur")
+ } else if (pwdInput.text.length === 0) {
+ console.log("ERROR password")
+ passwordItem.errorMessage = qsTr("Veuillez entrer un mot de passe")
+ } else if (pwdInput.text != confirmPwdInput.text) {
+ console.log("ERROR confirm pwd")
+ passwordItem.errorMessage = qsTr("Les mots de passe sont différents")
+ } else if (bar.currentIndex === 0 && phoneNumberInput.phoneNumber.length === 0) {
+ console.log("ERROR phone number")
+ phoneNumberInput.errorMessage = qsTr("Veuillez entrer un numéro de téléphone")
+ } else if (bar.currentIndex === 1 && emailInput.text.length === 0) {
+ console.log("ERROR email")
+ emailItem.errorMessage = qsTr("Veuillez entrer un email")
+ } else {
+ console.log("[RegisterPage] User: Call register")
+ mainItem.browserValidationRequested()
+ if (bar.currentIndex === 0)
+ RegisterPageCpp.registerNewAccount(usernameInput.text, pwdInput.text, "", phoneNumberInput.completePhoneNumber)
+ else
+ RegisterPageCpp.registerNewAccount(usernameInput.text, pwdInput.text, emailInput.text, "")
}
- Text {
- activeFocusOnTab: true
- font {
- underline: true
- pixelSize: 14 * DefaultStyle.dp
- weight: 400 * DefaultStyle.dp
- bold: activeFocus
- }
- text: qsTr("conditions d’utilisation")
- Keys.onPressed: (event)=> {
- if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
- cguMouseArea.clicked(undefined)
- event.accepted = true;
- }
- }
- MouseArea {
- id: cguMouseArea
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
- onClicked: Qt.openUrlExternally(ConstantsCpp.CguUrl)
- }
- }
- Text {
- text: qsTr(" et la ")
- font {
- pixelSize: 14 * DefaultStyle.dp
- weight: 400 * DefaultStyle.dp
- }
- }
- Text {
- activeFocusOnTab: true
- font {
- underline: true
- pixelSize: 14 * DefaultStyle.dp
- weight: 400 * DefaultStyle.dp
- bold: activeFocus
- }
- text: qsTr("politique de confidentialité.")
- Keys.onPressed: (event)=> {
- if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
- privateMouseArea.clicked(undefined)
- event.accepted = true;
- }
- }
- MouseArea {
- id: privateMouseArea
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
- onClicked: Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl)
- }
- }
- }
- }
- // }
- Button {
- enabled: termsCheckBox.checked
- leftPadding: 20 * DefaultStyle.dp
- rightPadding: 20 * DefaultStyle.dp
- topPadding: 11 * DefaultStyle.dp
- bottomPadding: 11 * DefaultStyle.dp
- text: qsTr("Créer")
- onClicked:{
- if (usernameInput.text.length === 0) {
- console.log("ERROR username")
- usernameItem.errorMessage = qsTr("Veuillez entrer un nom d'utilisateur")
- } else if (pwdInput.text.length === 0) {
- console.log("ERROR password")
- passwordItem.errorMessage = qsTr("Veuillez entrer un mot de passe")
- } else if (pwdInput.text != confirmPwdInput.text) {
- console.log("ERROR confirm pwd")
- passwordItem.errorMessage = qsTr("Les mots de passe sont différents")
- } else if (bar.currentIndex === 0 && phoneNumberInput.phoneNumber.length === 0) {
- console.log("ERROR phone number")
- phoneNumberInput.errorMessage = qsTr("Veuillez entrer un numéro de téléphone")
- } else if (bar.currentIndex === 1 && emailInput.text.length === 0) {
- console.log("ERROR email")
- emailItem.errorMessage = qsTr("Veuillez entrer un email")
- } else {
- console.log("[RegisterPage] User: Call register")
- mainItem.browserValidationRequested()
- if (bar.currentIndex === 0)
- RegisterPageCpp.registerNewAccount(usernameInput.text, pwdInput.text, "", phoneNumberInput.completePhoneNumber)
- else
- RegisterPageCpp.registerNewAccount(usernameInput.text, pwdInput.text, emailInput.text, "")
}
}
}
diff --git a/Linphone/view/Page/Layout/Login/LoginLayout.qml b/Linphone/view/Page/Layout/Login/LoginLayout.qml
index 84424f0fa..5ec33a8f4 100644
--- a/Linphone/view/Page/Layout/Login/LoginLayout.qml
+++ b/Linphone/view/Page/Layout/Login/LoginLayout.qml
@@ -7,20 +7,116 @@ import QtQuick.Layouts
import QtQuick.Controls.Basic as Control
import Linphone
+import ConstantsCpp
Rectangle {
id: mainItem
property alias titleContent : titleLayout.children
property alias centerContent : centerLayout.children
color: DefaultStyle.grey_0
+
+ component AboutLine: RowLayout {
+ id: line
+ spacing: 20 * DefaultStyle.dp
+ property var imageSource
+ property string title
+ property string text
+ signal contentClicked()
+ EffectImage {
+ Layout.preferredWidth: 32 * DefaultStyle.dp
+ Layout.preferredHeight: 32 * DefaultStyle.dp
+ imageSource: parent.imageSource
+ colorizationColor: DefaultStyle.main1_500_main
+ }
+ ColumnLayout {
+ spacing: 0
+ Text {
+ Layout.fillWidth: true
+ text: line.title
+ color: DefaultStyle.main2_600
+ font {
+ pixelSize: 15 * DefaultStyle.dp
+ weight: 600 * DefaultStyle.dp
+ }
+ horizontalAlignment: Layout.AlignLeft
+ }
+ Text {
+ id: content
+ Layout.fillWidth: true
+ text: line.text
+ color: DefaultStyle.main2_500main
+ font.pixelSize: 14 * DefaultStyle.dp
+ horizontalAlignment: Layout.AlignLeft
+ Keys.onPressed: (event)=> {
+ if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
+ line.contentClicked(undefined)
+ event.accepted = true;
+ }
+ }
+ MouseArea {
+ id: privateMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
+ onClicked: line.contentClicked()
+ }
+ }
+ }
+ // Item {Layout.fillWidth: true}
+ }
+
+ Dialog {
+ id: aboutPopup
+ anchors.centerIn: parent
+ width: 637 * DefaultStyle.dp
+ title: qsTr("À propos de Linphone")
+ bottomPadding: 10 * DefaultStyle.dp
+ buttons: []
+ content: RowLayout {
+ ColumnLayout {
+ spacing: 17 * DefaultStyle.dp
+ Layout.alignment: Qt.AlignTop | Qt.AlignLeft
+ AboutLine {
+ imageSource: AppIcons.detective
+ title: qsTr("Politique de confidentialité")
+ text: qsTr("Visiter notre potilique de confidentialité")
+ onContentClicked: Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl)
+ }
+ AboutLine {
+ imageSource: AppIcons.info
+ title: qsTr("Version")
+ text: Qt.application.version
+ }
+ AboutLine {
+ imageSource: AppIcons.checkSquareOffset
+ title: qsTr("Licence")
+ text: applicationLicence
+ }
+ AboutLine {
+ imageSource: AppIcons.copyright
+ title: qsTr("Copyright")
+ text: applicationVendor
+ }
+ Item {
+ // Item to shift close button
+ Layout.preferredHeight: 10 * DefaultStyle.dp
+ }
+ }
+ Button {
+ Layout.alignment: Qt.AlignRight | Qt.AlignBottom
+ text: qsTr("Fermer")
+ leftPadding: 16 * DefaultStyle.dp
+ rightPadding: 16 * DefaultStyle.dp
+ topPadding: 10 * DefaultStyle.dp
+ bottomPadding: 10 * DefaultStyle.dp
+ onClicked: aboutPopup.close()
+ }
+ }
+ }
+
ColumnLayout {
- // anchors.leftMargin: 119 * DefaultStyle.dp
id: contentLayout
- // anchors.top: parent.top
- // anchors.left: parent.left
- // anchors.right: parent.right
anchors.fill: parent
- // anchors.bottom: bottomMountains.top
spacing: 0
RowLayout {
Layout.fillWidth: true
@@ -40,7 +136,7 @@ Rectangle {
textSize: 14 * DefaultStyle.dp
textWeight: 400 * DefaultStyle.dp
textColor: DefaultStyle.main2_500main
- onClicked: console.debug("[LoginLayout]User: open about popup")
+ onClicked: aboutPopup.open()
background: Item{}
}
@@ -59,7 +155,6 @@ Rectangle {
}
Image {
id: bottomMountains
- z: -1
source: AppIcons.belledonne
fillMode: Image.Stretch
Layout.fillWidth: true
diff --git a/Linphone/view/Page/Main/Start/WelcomePage.qml b/Linphone/view/Page/Main/Start/WelcomePage.qml
index f537a877f..dbb278474 100644
--- a/Linphone/view/Page/Main/Start/WelcomePage.qml
+++ b/Linphone/view/Page/Main/Start/WelcomePage.qml
@@ -42,16 +42,12 @@ LoginLayout {
Layout.rightMargin: 50 * DefaultStyle.dp
Layout.alignment: Qt.AlignVCenter | Layout.AlignRight
background: Item {
- visible: false
- }
- contentItem: Text {
- text: qsTr("Passer")
- font {
- underline: true
- pixelSize: 13 * DefaultStyle.dp
- weight: 600 * DefaultStyle.dp
- }
}
+ text: qsTr("Passer")
+ textColor: DefaultStyle.main2_600
+ underline: true
+ textSize: 13 * DefaultStyle.dp
+ textWeight: 600 * DefaultStyle.dp
onClicked: {
console.debug("[WelcomePage] User: Click skip")
mainItem.startButtonPressed()
diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml
index 18f5e1dc6..33b23889d 100644
--- a/Linphone/view/Page/Window/Call/CallsWindow.qml
+++ b/Linphone/view/Page/Window/Call/CallsWindow.qml
@@ -623,6 +623,7 @@ AbstractWindow {
searchBarBorderColor: DefaultStyle.grey_200
numPadPopup: numericPad
onContactClicked: (contact) => {
+ rightPanel.visible = false
mainWindow.startCallWithContact(contact, false, rightPanel)
}
@@ -637,6 +638,7 @@ AbstractWindow {
topPadding: 41 * DefaultStyle.dp
bottomPadding: 18 * DefaultStyle.dp
onLaunchCall: {
+ rightPanel.visible = false
UtilsCpp.createCall(newCallForm.searchBar.text)
}
Component.onCompleted: parent.height = height
@@ -1016,7 +1018,8 @@ AbstractWindow {
visible: middleItemStackView.currentItem.objectName == "inCallItem"
function refreshLayout() {
- if (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning) {
+ if (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
+ || mainWindow.callState === LinphoneEnums.CallState.Paused || mainWindow.callState === LinphoneEnums.CallState.PausedByRemote) {
connectedCallButtons.visible = bottomButtonsLayout.visible
moreOptionsButton.visible = bottomButtonsLayout.visible
bottomButtonsLayout.layoutDirection = Qt.RightToLeft
@@ -1103,6 +1106,7 @@ AbstractWindow {
icon.height: 32 * DefaultStyle.dp
contentImageColor: enabled ? DefaultStyle.grey_0 : DefaultStyle.grey_500
onCheckedChanged: {
+ console.log("checked transfer changed", checked)
if (checked) {
rightPanel.visible = true
rightPanel.replace(callTransferPanel)
@@ -1123,8 +1127,8 @@ AbstractWindow {
Layout.preferredHeight: 55 * DefaultStyle.dp
icon.width: 32 * DefaultStyle.dp
icon.height: 32 * DefaultStyle.dp
- checked: rightPanel.visible && rightPanel.currentItem ? rightPanel.currentItem.objectName === "newCallPanel" : false
onCheckedChanged: {
+ console.log("checked newcall changed", checked)
if (checked) {
rightPanel.visible = true
rightPanel.replace(newCallPanel)
@@ -1132,6 +1136,10 @@ AbstractWindow {
rightPanel.visible = false
}
}
+ Connections {
+ target: rightPanel
+ function onVisibleChanged() { if(!rightPanel.visible) newCallButton.checked = false}
+ }
}
}
RowLayout {
diff --git a/Linphone/view/Page/Window/Main/MainWindow.qml b/Linphone/view/Page/Window/Main/MainWindow.qml
index 50d50de47..ba5efe745 100644
--- a/Linphone/view/Page/Window/Main/MainWindow.qml
+++ b/Linphone/view/Page/Window/Main/MainWindow.qml
@@ -14,6 +14,8 @@ AbstractWindow {
property bool firstConnection: true
color: DefaultStyle.grey_0
+ minimumWidth: 1020
+ minimumHeight: 700
signal callCreated()
property var accountProxy
diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml
index ce775186b..af476eee3 100644
--- a/Linphone/view/Style/AppIcons.qml
+++ b/Linphone/view/Style/AppIcons.qml
@@ -21,6 +21,9 @@ QtObject {
property string reloadArrow: "image://internal/arrow-clockwise.svg"
property string arrowsMerge: "image://internal/arrows-merge.svg"
property string info: "image://internal/info.svg"
+ property string detective: "image://internal/detective.svg"
+ property string copyright: "image://internal/copyright.svg"
+ property string checkSquareOffset: "image://internal/check-square-offset.svg"
property string loginImage: "image://internal/login_image.svg"
property string belledonne: "image://internal/belledonne.svg"
property string profile: "image://internal/user-circle.svg"
@@ -103,7 +106,6 @@ QtObject {
property string license: "image://internal/license.svg"
property string debug: "image://internal/debug.svg"
property string world: "image://internal/world.svg"
- property string detective: "image://internal/detective.svg"
property string warningCircle: "image://internal/warning-circle.svg"
property string fullscreen: "image://internal/fullscreen.svg"
property string cellSignalFull: "image://internal/cell-signal-full.svg"