From 9797ad70b05970fc80d604d95d9553f863060557 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Tue, 5 Nov 2024 10:45:17 +0100 Subject: [PATCH] contact edition new ui --- .../Container/Contact/ContactLayout.qml | 2 +- .../view/Control/Container/FormItemLayout.qml | 10 +- .../view/Control/Form/Login/LoginForm.qml | 6 +- .../view/Control/Input/DecoratedTextField.qml | 1 + .../Popup/Dialog/AuthenticationDialog.qml | 2 +- .../view/Page/Form/Contact/ContactEdition.qml | 483 +++++++++--------- .../view/Page/Form/Login/SIPLoginPage.qml | 12 +- .../view/Page/Form/Register/RegisterPage.qml | 196 ++++--- .../AccountSettingsParametersLayout.qml | 7 + Linphone/view/Page/Main/Call/CallPage.qml | 1 - .../view/Page/Main/Contact/ContactPage.qml | 6 +- .../view/Page/Main/Meeting/MeetingPage.qml | 1 - .../view/Page/Window/Call/CallsWindow.qml | 2 - Linphone/view/Page/Window/Main/MainWindow.qml | 2 +- 14 files changed, 359 insertions(+), 372 deletions(-) diff --git a/Linphone/view/Control/Container/Contact/ContactLayout.qml b/Linphone/view/Control/Container/Contact/ContactLayout.qml index 62f031876..16ec3ea3b 100644 --- a/Linphone/view/Control/Container/Contact/ContactLayout.qml +++ b/Linphone/view/Control/Container/Contact/ContactLayout.qml @@ -59,7 +59,7 @@ ColumnLayout { height: childrenRect.height } } - ColumnLayout { + StackLayout { id: detailLayout Layout.alignment: Qt.AlignCenter Layout.topMargin: 30 * DefaultStyle.dp diff --git a/Linphone/view/Control/Container/FormItemLayout.qml b/Linphone/view/Control/Container/FormItemLayout.qml index 61faa1954..51e087804 100644 --- a/Linphone/view/Control/Container/FormItemLayout.qml +++ b/Linphone/view/Control/Container/FormItemLayout.qml @@ -14,7 +14,6 @@ FocusScope{ property bool enableErrorText: false property bool errorTextVisible: errorText.text.length > 0 implicitHeight: layout.implicitHeight - implicitWidth: layout.implicitWidth function clearErrorText() { errorText.clear() @@ -22,6 +21,8 @@ FocusScope{ ColumnLayout { id: layout spacing: 5 * DefaultStyle.dp + anchors.left: parent.left + anchors.right: parent.right Text { visible: label.length > 0 @@ -41,11 +42,12 @@ FocusScope{ Item { Layout.preferredHeight: childrenRect.height - Layout.preferredWidth: childrenRect.width - Item { + Layout.fillWidth: true + StackLayout { id: contentItem height: childrenRect.height - width: childrenRect.width + anchors.left: parent.left + anchors.right: parent.right } TemporaryText { id: errorText diff --git a/Linphone/view/Control/Form/Login/LoginForm.qml b/Linphone/view/Control/Form/Login/LoginForm.qml index 222f5230f..421269e2b 100644 --- a/Linphone/view/Control/Form/Login/LoginForm.qml +++ b/Linphone/view/Control/Form/Login/LoginForm.qml @@ -11,28 +11,30 @@ ColumnLayout { FormItemLayout { id: username + Layout.preferredWidth: 346 * DefaultStyle.dp label: qsTr("Nom d'utilisateur") mandatory: true enableErrorText: true contentItem: TextField { id: usernameEdit - isError: username.errorTextVisible || errorText.visible Layout.preferredWidth: 360 * DefaultStyle.dp Layout.preferredHeight: 49 * DefaultStyle.dp + isError: username.errorTextVisible || errorText.visible } } Item { Layout.preferredHeight: password.implicitHeight FormItemLayout { id: password + width: 346 * DefaultStyle.dp label: qsTr("Mot de passe") mandatory: true enableErrorText: true contentItem: TextField { id: passwordEdit - isError: password.errorTextVisible || errorText.visible Layout.preferredWidth: 360 * DefaultStyle.dp Layout.preferredHeight: 49 * DefaultStyle.dp + isError: password.errorTextVisible || errorText.visible hidden: true } TemporaryText { diff --git a/Linphone/view/Control/Input/DecoratedTextField.qml b/Linphone/view/Control/Input/DecoratedTextField.qml index 181bb0ec8..ace93bf34 100644 --- a/Linphone/view/Control/Input/DecoratedTextField.qml +++ b/Linphone/view/Control/Input/DecoratedTextField.qml @@ -31,6 +31,7 @@ FormItemLayout { contentItem: TextField { id: textField + Layout.preferredWidth: 360 * DefaultStyle.dp placeholderText: useTitleAsPlaceHolder ? mainItem.title : mainItem.placeHolder initialText: mainItem.propertyOwner[mainItem.propertyName] customWidth: mainItem.parent.width diff --git a/Linphone/view/Control/Popup/Dialog/AuthenticationDialog.qml b/Linphone/view/Control/Popup/Dialog/AuthenticationDialog.qml index cb0d54a3b..9f2d2ab47 100644 --- a/Linphone/view/Control/Popup/Dialog/AuthenticationDialog.qml +++ b/Linphone/view/Control/Popup/Dialog/AuthenticationDialog.qml @@ -20,6 +20,7 @@ Dialog { bottomPadding: 20 * DefaultStyle.dp leftPadding: 20 * DefaultStyle.dp rightPadding: 20 * DefaultStyle.dp + width: 637 * DefaultStyle.dp content: ColumnLayout { spacing: 20 * DefaultStyle.dp id: contentLayout @@ -39,7 +40,6 @@ Dialog { label: qsTr("Identité") contentItem: TextField { enabled: false - customWidth: parent.width initialText: mainItem.identity } } diff --git a/Linphone/view/Page/Form/Contact/ContactEdition.qml b/Linphone/view/Page/Form/Contact/ContactEdition.qml index 1817fa9f4..4e064be94 100644 --- a/Linphone/view/Page/Form/Contact/ContactEdition.qml +++ b/Linphone/view/Page/Form/Contact/ContactEdition.qml @@ -83,9 +83,9 @@ MainRightPanel { bannerContent: [ IconLabelButton { id: addPictureButton - visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0 Layout.preferredWidth: width Layout.preferredHeight: 17 * DefaultStyle.dp + visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0 iconSource: AppIcons.camera iconSize: 17 * DefaultStyle.dp backgroundColor: "transparent" @@ -133,11 +133,9 @@ MainRightPanel { Item{Layout.fillWidth: true} ] content: Flickable { - id: editFlicakble - Layout.fillHeight: true - Layout.fillWidth: true - // width: parent.width - // height: parent.height + id: editionLayout + contentWidth: 421 * DefaultStyle.dp + function ensureVisible(r) { if (contentY >= r.y) contentY = r.y; @@ -146,275 +144,254 @@ MainRightPanel { } ScrollBar.vertical: Control.ScrollBar { + anchors.right: parent.right } ScrollBar.horizontal: Control.ScrollBar { } + ColumnLayout { + spacing: 20 * DefaultStyle.dp + anchors.left: parent.left + anchors.right: parent.right - RowLayout { - spacing: 100 * DefaultStyle.dp - // anchors.left: parent.left - // anchors.right: parent.right - ColumnLayout { - spacing: 20 * DefaultStyle.dp + FormItemLayout { + id: givenName Layout.fillWidth: true - Layout.fillHeight: true - - FormItemLayout { - id: givenName - enableErrorText: true - label: qsTr("Prénom") - Layout.fillWidth: true - contentItem: TextField { - id: givenNameEdit - Layout.fillWidth: true - initialText: contact.core.givenName - onTextEdited: contact.core.givenName = text - backgroundColor: DefaultStyle.grey_0 - backgroundBorderColor: givenName.errorTextVisible ? DefaultStyle.danger_500main : DefaultStyle.grey_200 - KeyNavigation.up: editButton.visible ? editButton : addPictureButton - KeyNavigation.down: nameTextField + enableErrorText: true + label: qsTr("Prénom") + contentItem: TextField { + id: givenNameEdit + Layout.preferredHeight: 49 * DefaultStyle.dp + initialText: contact.core.givenName + onTextEdited: contact.core.givenName = text + backgroundColor: DefaultStyle.grey_0 + backgroundBorderColor: givenName.errorTextVisible ? DefaultStyle.danger_500main : DefaultStyle.grey_200 + KeyNavigation.up: editButton.visible ? editButton : addPictureButton + KeyNavigation.down: nameTextField + } + } + FormItemLayout { + label: qsTr("Nom") + Layout.fillWidth: true + contentItem: TextField { + id: nameTextField + initialText: contact.core.familyName + onTextEdited: contact.core.familyName = text + backgroundColor: DefaultStyle.grey_0 + KeyNavigation.up: givenNameEdit + KeyNavigation.down: companyTextField + } + } + FormItemLayout { + label: qsTr("Entreprise") + Layout.fillWidth: true + contentItem: TextField { + id: companyTextField + initialText: contact.core.organization + onTextEdited: contact.core.organization = text + backgroundColor: DefaultStyle.grey_0 + KeyNavigation.up: nameTextField + KeyNavigation.down: jobTextField + } + } + FormItemLayout { + label: qsTr("Fonction") + Layout.fillWidth: true + contentItem: TextField { + id: jobTextField + initialText: contact.core.job + onTextEdited: contact.core.job = text + backgroundColor: DefaultStyle.grey_0 + KeyNavigation.up: companyTextField + Keys.onPressed: (event) => { + if(event.key == Qt.Key_Down){ + if(addressesList.count > 0) + addressesList.itemAt(0).forceActiveFocus() + else + newAddressTextField.forceActiveFocus() + event.accepted = true + } } } - FormItemLayout { - label: qsTr("Nom") - contentItem: TextField { - id: nameTextField - initialText: contact.core.familyName - onTextEdited: contact.core.familyName = text - backgroundColor: DefaultStyle.grey_0 - KeyNavigation.up: givenNameEdit - KeyNavigation.down: companyTextField - } + } + Repeater { + id: addressesList + onCountChanged: mainItem.addressCount = count + model: VariantList { + model: mainItem.contact && mainItem.contact.core.addresses || [] } - FormItemLayout { - label: qsTr("Entreprise") - contentItem: TextField { - id: companyTextField - initialText: contact.core.organization - onTextEdited: contact.core.organization = text - backgroundColor: DefaultStyle.grey_0 - KeyNavigation.up: nameTextField - KeyNavigation.down: jobTextField - } - } - FormItemLayout { - label: qsTr("Fonction") - contentItem: TextField { - id: jobTextField - initialText: contact.core.job - onTextEdited: contact.core.job = text - backgroundColor: DefaultStyle.grey_0 - KeyNavigation.up: companyTextField - Keys.onPressed: (event) => { - if(event.key == Qt.Key_Down){ - if(addressesList.count > 0) - addressesList.itemAt(0).forceActiveFocus() + delegate: FormItemLayout { + label: modelData.label + contentItem: RowLayout { + id: addressLayout + spacing: 10 * DefaultStyle.dp + function updateFocus(event){ + if(event.key == Qt.Key_Up){ + if(index - 1 >=0 ) + addressesList.itemAt(index - 1).forceActiveFocus() + else + jobTextField.forceActiveFocus() + event.accepted = true + }else if(event.key == Qt.Key_Down){ + if(index + 1 < addressesList.count) + addressesList.itemAt(index+1).forceActiveFocus() else newAddressTextField.forceActiveFocus() event.accepted = true } } + TextField { + id: addressTextField + Layout.preferredWidth: 421 * DefaultStyle.dp + Layout.preferredHeight: height + onEditingFinished: { + if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text) + } + property string _initialText: modelData.address + initialText: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_initialText) : _initialText + backgroundColor: DefaultStyle.grey_0 + focus: true + KeyNavigation.right: removeAddressButton + Keys.onPressed: (event) => addressLayout.updateFocus(event) + } + Button { + id: removeAddressButton + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + Layout.alignment: Qt.AlignVCenter + width: 24 * DefaultStyle.dp + height: 24 * DefaultStyle.dp + icon.source: AppIcons.closeX + icon.width: 24 * DefaultStyle.dp + icon.height: 24 * DefaultStyle.dp + background: Item{} + KeyNavigation.left: addressTextField + Keys.onPressed: (event) => addressLayout.updateFocus(event) + onClicked: mainItem.contact.core.removeAddress(index) + } } } - Item{Layout.fillHeight: true} } - ColumnLayout { - spacing: 20 * DefaultStyle.dp + FormItemLayout { + label: qsTr("Adresse SIP") Layout.fillWidth: true - Layout.fillHeight: true - Repeater { - id: addressesList - Layout.fillWidth: true - onCountChanged: mainItem.addressCount = count - model: VariantList { - model: mainItem.contact && mainItem.contact.core.addresses || [] - } - delegate: FormItemLayout { - label: modelData.label - contentItem: RowLayout { - id: addressLayout - spacing: 10 * DefaultStyle.dp - function updateFocus(event){ - if(event.key == Qt.Key_Up){ - if(index - 1 >=0 ) - addressesList.itemAt(index - 1).forceActiveFocus() - else - jobTextField.forceActiveFocus() - event.accepted = true - }else if(event.key == Qt.Key_Down){ - if(index + 1 < addressesList.count) - addressesList.itemAt(index+1).forceActiveFocus() - else - newAddressTextField.forceActiveFocus() - event.accepted = true - } - } - TextField { - id: addressTextField - onEditingFinished: { - if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text) - } - property string _initialText: modelData.address - initialText: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_initialText) : _initialText - backgroundColor: DefaultStyle.grey_0 - Layout.preferredWidth: width - Layout.preferredHeight: height - focus: true - KeyNavigation.right: removeAddressButton - Keys.onPressed: (event) => addressLayout.updateFocus(event) - } - Button { - id: removeAddressButton - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp - Layout.alignment: Qt.AlignVCenter - background: Item{} - icon.source: AppIcons.closeX - width: 24 * DefaultStyle.dp - height: 24 * DefaultStyle.dp - icon.width: 24 * DefaultStyle.dp - icon.height: 24 * DefaultStyle.dp - KeyNavigation.left: addressTextField - Keys.onPressed: (event) => addressLayout.updateFocus(event) - onClicked: mainItem.contact.core.removeAddress(index) - } + onYChanged: editionLayout.ensureVisible(this) + contentItem: TextField { + id: newAddressTextField + backgroundColor: DefaultStyle.grey_0 + Keys.onPressed: (event) => { + if(event.key == Qt.Key_Up){ + if(addressesList.count > 0 ) + addressesList.itemAt(addressesList.count - 1).forceActiveFocus() + else + jobTextField.forceActiveFocus() + event.accepted = true + }else if(event.key == Qt.Key_Down){ + if(phoneNumberList.count > 0) + phoneNumberList.itemAt(0).forceActiveFocus() + else + phoneNumberInputTextField.forceActiveFocus() + event.accepted = true } } - } - RowLayout { - onYChanged: editFlicakble.ensureVisible(this) - spacing: 10 * DefaultStyle.dp - FormItemLayout { - label: qsTr("Adresse SIP") - contentItem: TextField { - id: newAddressTextField - backgroundColor: DefaultStyle.grey_0 - Keys.onPressed: (event) => { - if(event.key == Qt.Key_Up){ - if(addressesList.count > 0 ) - addressesList.itemAt(addressesList.count - 1).forceActiveFocus() - else - jobTextField.forceActiveFocus() - event.accepted = true - }else if(event.key == Qt.Key_Down){ - if(phoneNumberList.count > 0) - phoneNumberList.itemAt(0).forceActiveFocus() - else - phoneNumberInputTextField.forceActiveFocus() - event.accepted = true - } - } - onEditingFinished: { - mainItem.contact.core.appendAddress(text) - newAddressTextField.clear() - } - } - } - Item { - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp + onEditingFinished: { + mainItem.contact.core.appendAddress(text) + newAddressTextField.clear() } } - Repeater { - // phone numbers - id: phoneNumberList - model: VariantList { - model: mainItem.contact && mainItem.contact.core.phoneNumbers || [] - } - delegate: FormItemLayout { - label: modelData.label - contentItem: RowLayout { - id: phoneNumberLayout - spacing: 10 * DefaultStyle.dp - function updateFocus(event){ - if(event.key == Qt.Key_Up){ - if(index - 1 >=0 ) - phoneNumberList.itemAt(index - 1).forceActiveFocus() - else - newAddressTextField.forceActiveFocus() - event.accepted = true - }else if(event.key == Qt.Key_Down){ - if(index + 1 < phoneNumberList.count) - addressesList.phoneNumberList(index+1).forceActiveFocus() - else - phoneNumberInputTextField.forceActiveFocus() - event.accepted = true - } - } - TextField { - id: phoneTextField - initialText: modelData.address - onTextEdited: { - if (text.length != 0) mainItem.contact.core.setPhoneNumberAt(index, qsTr("Téléphone"), text) - } - backgroundColor: DefaultStyle.grey_0 - Layout.preferredWidth: width - Layout.preferredHeight: height - focus: true - KeyNavigation.right: removePhoneButton - Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event) - } - Button { - id: removePhoneButton - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp - Layout.alignment: Qt.AlignVCenter - background: Item{} - icon.source: AppIcons.closeX - width: 24 * DefaultStyle.dp - height: 24 * DefaultStyle.dp - icon.width: 24 * DefaultStyle.dp - icon.height: 24 * DefaultStyle.dp - KeyNavigation.left: phoneTextField - Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event) - onClicked: mainItem.contact.core.removePhoneNumber(index) - } - } - } - } - RowLayout { - onYChanged: editFlicakble.ensureVisible(this) - spacing: 10 * DefaultStyle.dp - FormItemLayout { - id: phoneNumberInput - label: qsTr("Phone") - contentItem: TextField { - id: phoneNumberInputTextField - backgroundColor: DefaultStyle.grey_0 - Keys.onPressed: (event) => { - if(event.key == Qt.Key_Up){ - if(phoneNumberList.count > 0 ) - phoneNumberList.itemAt(phoneNumberList.count - 1).forceActiveFocus() - else - newAddressTextField.forceActiveFocus() - event.accepted = true - }else if(event.key == Qt.Key_Down){ - if(saveButton.enabled) - saveButton.forceActiveFocus() - else - givenNameEdit.forceActiveFocus() - event.accepted = true - } - } - onEditingFinished: { - if (text.length != 0) mainItem.contact.core.appendPhoneNumber(phoneNumberInput.label, text) - text = "" - } - } - } - Item { - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp - } - } - TemporaryText { - id: addressesErrorText - wrapMode: Text.WordWrap - elide: Text.ElideRight - Layout.fillWidth: true - } - Item{Layout.fillHeight: true} } + Repeater { + id: phoneNumberList + model: VariantList { + model: mainItem.contact && mainItem.contact.core.phoneNumbers || [] + } + delegate: FormItemLayout { + label: modelData.label + contentItem: RowLayout { + id: phoneNumberLayout + spacing: 10 * DefaultStyle.dp + function updateFocus(event){ + if(event.key == Qt.Key_Up){ + if(index - 1 >=0 ) + phoneNumberList.itemAt(index - 1).forceActiveFocus() + else + newAddressTextField.forceActiveFocus() + event.accepted = true + }else if(event.key == Qt.Key_Down){ + if(index + 1 < phoneNumberList.count) + phoneNumberList.itemAt(index+1).forceActiveFocus() + else + phoneNumberInputTextField.forceActiveFocus() + event.accepted = true + } + } + TextField { + id: phoneTextField + Layout.preferredWidth: 421 * DefaultStyle.dp + Layout.preferredHeight: height + initialText: modelData.address + backgroundColor: DefaultStyle.grey_0 + focus: true + KeyNavigation.right: removePhoneButton + Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event) + onEditingFinished: { + if (text.length != 0) mainItem.contact.core.setPhoneNumberAt(index, qsTr("Téléphone"), text) + } + } + Button { + id: removePhoneButton + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + Layout.alignment: Qt.AlignVCenter + width: 24 * DefaultStyle.dp + height: 24 * DefaultStyle.dp + background: Item{} + icon.source: AppIcons.closeX + icon.width: 24 * DefaultStyle.dp + icon.height: 24 * DefaultStyle.dp + KeyNavigation.left: phoneTextField + Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event) + onClicked: mainItem.contact.core.removePhoneNumber(index) + } + } + } + } + FormItemLayout { + id: phoneNumberInput + Layout.fillWidth: true + label: qsTr("Phone") + onYChanged: editionLayout.ensureVisible(this) + contentItem: TextField { + id: phoneNumberInputTextField + backgroundColor: DefaultStyle.grey_0 + Keys.onPressed: (event) => { + if(event.key == Qt.Key_Up){ + if(phoneNumberList.count > 0 ) + phoneNumberList.itemAt(phoneNumberList.count - 1).forceActiveFocus() + else + newAddressTextField.forceActiveFocus() + event.accepted = true + }else if(event.key == Qt.Key_Down){ + if(saveButton.enabled) + saveButton.forceActiveFocus() + else + givenNameEdit.forceActiveFocus() + event.accepted = true + } + } + onEditingFinished: { + if (text.length != 0) mainItem.contact.core.appendPhoneNumber(phoneNumberInput.label, text) + text = "" + } + } + } + TemporaryText { + id: addressesErrorText + Layout.fillWidth: true + wrapMode: Text.WordWrap + elide: Text.ElideRight + onTextChanged: editionLayout.ensureVisible(this) + } + Item{Layout.fillHeight: true} } } diff --git a/Linphone/view/Page/Form/Login/SIPLoginPage.qml b/Linphone/view/Page/Form/Login/SIPLoginPage.qml index 14388193c..6622d6c3f 100644 --- a/Linphone/view/Page/Form/Login/SIPLoginPage.qml +++ b/Linphone/view/Page/Form/Login/SIPLoginPage.qml @@ -82,7 +82,7 @@ LoginLayout { Component { id: firstItem Flickable { - width: contentWidth + width: parent.width contentWidth: content.implicitWidth contentHeight: content.implicitHeight clip: true @@ -188,7 +188,7 @@ LoginLayout { Component { id: secondItem Flickable { - width: contentWidth + width: parent.width contentWidth: content.implicitWidth contentHeight: content.implicitHeight clip: true @@ -196,6 +196,8 @@ LoginLayout { ColumnLayout { id: content spacing: 2 * DefaultStyle.dp + width: 361 * DefaultStyle.dp + ColumnLayout { spacing: 16 * DefaultStyle.dp FormItemLayout { @@ -203,6 +205,7 @@ LoginLayout { label: qsTr("Nom d'utilisateur") mandatory: true enableErrorText: true + Layout.fillWidth: true contentItem: TextField { id: usernameEdit isError: username.errorTextVisible @@ -215,6 +218,7 @@ LoginLayout { label: qsTr("Mot de passe") mandatory: true enableErrorText: true + Layout.fillWidth: true contentItem: TextField { id: passwordEdit isError: password.errorTextVisible @@ -229,6 +233,7 @@ LoginLayout { label: qsTr("Domaine") mandatory: true enableErrorText: true + Layout.fillWidth: true contentItem: TextField { id: domainEdit isError: domain.errorTextVisible @@ -246,6 +251,7 @@ LoginLayout { } FormItemLayout { label: qsTr("Nom d'affichage") + Layout.fillWidth: true contentItem: TextField { id: displayName Layout.preferredWidth: 360 * DefaultStyle.dp @@ -256,6 +262,7 @@ LoginLayout { } FormItemLayout { label: qsTr("Transport") + Layout.fillWidth: true contentItem: ComboBox { id: transportCbox height: 49 * DefaultStyle.dp @@ -276,6 +283,7 @@ LoginLayout { TemporaryText { id: errorText + Layout.fillWidth: true Connections { target: LoginPageCpp function onErrorMessageChanged(error) { diff --git a/Linphone/view/Page/Form/Register/RegisterPage.qml b/Linphone/view/Page/Form/Register/RegisterPage.qml index dee1c5ba8..acbde9d8f 100644 --- a/Linphone/view/Page/Form/Register/RegisterPage.qml +++ b/Linphone/view/Page/Form/Register/RegisterPage.qml @@ -93,60 +93,62 @@ LoginLayout { Layout.fillWidth: true Layout.fillHeight: true ColumnLayout { + anchors.left: parent.left + anchors.right: parent.right spacing: 22 * DefaultStyle.dp ColumnLayout { spacing: 24 * DefaultStyle.dp RowLayout { + Layout.preferredHeight: usernameItem.height spacing: 16 * DefaultStyle.dp FormItemLayout { id: usernameItem label: qsTr("Username") mandatory: true enableErrorText: true + Layout.preferredWidth: 346 * DefaultStyle.dp 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 + enabled: false + model: [{text:"@sip.linphone.org"}] } EffectImage { - imageSource: AppIcons.lock - colorizationColor: DefaultStyle.main2_600 Layout.preferredWidth: 16 * DefaultStyle.dp Layout.preferredHeight: 16 * DefaultStyle.dp + imageSource: AppIcons.lock + colorizationColor: DefaultStyle.main2_600 } } } StackLayout { currentIndex: bar.currentIndex - Layout.fillWidth: true PhoneNumberInput { id: phoneNumberInput + Layout.preferredWidth: 346 * DefaultStyle.dp 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 + Layout.fillWidth: false + Layout.preferredWidth: 346 * DefaultStyle.dp 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 } } @@ -158,33 +160,29 @@ LoginLayout { 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 - } + FormItemLayout { + id: passwordItem + Layout.preferredWidth: 346 * DefaultStyle.dp + 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 - } + FormItemLayout { + Layout.preferredWidth: 346 * DefaultStyle.dp + 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 } } } @@ -216,80 +214,80 @@ LoginLayout { // } // } + RowLayout { + spacing: 10 * DefaultStyle.dp + CheckBox { + id: termsCheckBox + } RowLayout { - spacing: 10 * DefaultStyle.dp - CheckBox { - id: termsCheckBox + 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() + } } - 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() + 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; } } - 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) + 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; } } - 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) - } + MouseArea { + id: privateMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor + onClicked: Qt.openUrlExternally(ConstantsCpp.PrivatePolicyUrl) } } } + } // } Button { enabled: termsCheckBox.checked diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml index 2150a8f36..9e017aea1 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml @@ -47,6 +47,7 @@ AbstractSettingsLayout { Layout.leftMargin: 64 * DefaultStyle.dp Layout.topMargin: 20 * DefaultStyle.dp DecoratedTextField { + Layout.fillWidth: true propertyName: "mwiServerAddress" propertyOwner: account.core title: qsTr("URI du serveur de messagerie vocale") @@ -114,6 +115,7 @@ AbstractSettingsLayout { propertyOwner: account.core } DecoratedTextField { + Layout.fillWidth: true title: qsTr("URL du serveur mandataire") propertyName: "serverAddress" propertyOwner: account.core @@ -126,6 +128,7 @@ AbstractSettingsLayout { propertyOwner: account.core } DecoratedTextField { + Layout.fillWidth: true propertyName: "stunServer" propertyOwner: account.core title: qsTr("Adresse du serveur STUN") @@ -148,6 +151,7 @@ AbstractSettingsLayout { propertyOwner: account.core } DecoratedTextField { + Layout.fillWidth: true propertyName: "expire" propertyOwner: account.core title: qsTr("Expiration (en seconde)") @@ -156,6 +160,7 @@ AbstractSettingsLayout { toValidate: true } DecoratedTextField { + Layout.fillWidth: true title: qsTr("URI de l’usine à conversations") propertyName: "conferenceFactoryAddress" propertyOwner: account.core @@ -163,6 +168,7 @@ AbstractSettingsLayout { toValidate: true } DecoratedTextField { + Layout.fillWidth: true title: qsTr("URI de l’usine à réunions") propertyName: "audioVideoConferenceFactoryAddress" propertyOwner: account.core @@ -171,6 +177,7 @@ AbstractSettingsLayout { toValidate: true } DecoratedTextField { + Layout.fillWidth: true title: qsTr("URL du serveur d’échange de clés de chiffrement") propertyName: "limeServerUrl" propertyOwner: account.core diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index cfbe44211..62d92e4f8 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -217,7 +217,6 @@ AbstractMainPage { property: "showDefaultItem" when: searchBar.text.length != 0 value: false - restoreMode: Binding.RestoreBindingOrValue } } Item { diff --git a/Linphone/view/Page/Main/Contact/ContactPage.qml b/Linphone/view/Page/Main/Contact/ContactPage.qml index febccf83b..d132623da 100644 --- a/Linphone/view/Page/Main/Contact/ContactPage.qml +++ b/Linphone/view/Page/Main/Contact/ContactPage.qml @@ -14,7 +14,7 @@ AbstractMainPage { newItemIconSource: AppIcons.plusCircle // disable left panel contact list interaction while a contact is being edited - property bool leftPanelEnabled: true + property bool leftPanelEnabled: !rightPanelStackView.currentItem || rightPanelStackView.currentItem.objectName != "contactEdition" property FriendGui selectedContact property string initialFriendToDisplay @@ -551,8 +551,6 @@ AbstractMainPage { } ] content: Flickable { - Layout.fillWidth: true - Layout.fillHeight: true contentWidth: parent.width ColumnLayout { spacing: 32 * DefaultStyle.dp @@ -912,8 +910,6 @@ AbstractMainPage { id: contactEdition ContactEdition { property string objectName: "contactEdition" - Control.StackView.onActivated: mainItem.leftPanelEnabled = false - Control.StackView.onDeactivated: mainItem.leftPanelEnabled = true onCloseEdition: { if (rightPanelStackView.depth <= 1) rightPanelStackView.clear() else rightPanelStackView.pop(Control.StackView.Immediate) diff --git a/Linphone/view/Page/Main/Meeting/MeetingPage.qml b/Linphone/view/Page/Main/Meeting/MeetingPage.qml index fe7309d5a..51ee27862 100644 --- a/Linphone/view/Page/Main/Meeting/MeetingPage.qml +++ b/Linphone/view/Page/Main/Meeting/MeetingPage.qml @@ -172,7 +172,6 @@ AbstractMainPage { property: "showDefaultItem" when: searchBar.text.length !== 0 value: false - restoreMode: Binding.RestoreBindingOrValue } } Text { diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index 2b6845458..a5e80636f 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -960,14 +960,12 @@ AbstractWindow { when: middleItemStackView.currentItem.objectName === "waitingRoom" property: "imageSource" value: AppIcons.usersThree - restoreMode: Binding.RestoreBindingOrValue } Binding { target: callStatusText when: middleItemStackView.currentItem.objectName === "waitingRoom" property: "text" value: waitingRoomIn.conferenceInfo ? waitingRoomIn.conferenceInfo.core.subject : '' - restoreMode: Binding.RestoreBindingOrValue } Binding { target: conferenceDate diff --git a/Linphone/view/Page/Window/Main/MainWindow.qml b/Linphone/view/Page/Window/Main/MainWindow.qml index ba5efe745..c35123834 100644 --- a/Linphone/view/Page/Window/Main/MainWindow.qml +++ b/Linphone/view/Page/Window/Main/MainWindow.qml @@ -19,7 +19,7 @@ AbstractWindow { signal callCreated() property var accountProxy - + // TODO : use this to make the border transparent // flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowTitleHint // menuBar: Rectangle {