Commit 83bf254d authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/ManageAccounts): refactoring, use now a vertical form

parent 45542488
...@@ -17,6 +17,7 @@ Column { ...@@ -17,6 +17,7 @@ Column {
ColumnLayout { ColumnLayout {
spacing: FormStyle.header.spacing spacing: FormStyle.header.spacing
visible: parent.title.length > 0
width: parent.width width: parent.width
Text { Text {
......
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0 import Common 1.0
import Linphone 1.0 import Linphone 1.0
...@@ -31,39 +30,31 @@ DialogPlus { ...@@ -31,39 +30,31 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Column { Form {
orientation: Qt.Vertical
anchors { anchors {
fill: parent left: parent.left
leftMargin: ManageAccountsStyle.leftMargin leftMargin: ManageAccountsStyle.leftMargin
right: parent.right
rightMargin: ManageAccountsStyle.rightMargin rightMargin: ManageAccountsStyle.rightMargin
} }
spacing: ManageAccountsStyle.input.spacing FormLine {
FormGroup {
Text { label: qsTr('selectAccountLabel')
color: ManageAccountsStyle.input.legend.color
elide: Text.ElideRight
font {
bold: true
pointSize: ManageAccountsStyle.input.legend.fontSize
}
text: qsTr('selectAccountLabel')
}
ComboBox { ComboBox {
id: email
currentIndex: Utils.findIndex(AccountSettingsModel.accounts, function (account) { currentIndex: Utils.findIndex(AccountSettingsModel.accounts, function (account) {
return account.sipAddress === AccountSettingsModel.sipAddress return account.sipAddress === AccountSettingsModel.sipAddress
}) })
model: AccountSettingsModel.accounts model: AccountSettingsModel.accounts
textRole: 'sipAddress' textRole: 'sipAddress'
width: parent.width
onActivated: AccountSettingsModel.setDefaultProxyConfig(model[index].proxyConfig) onActivated: AccountSettingsModel.setDefaultProxyConfig(model[index].proxyConfig)
} }
} }
}
}
} }
...@@ -10,13 +10,4 @@ QtObject { ...@@ -10,13 +10,4 @@ QtObject {
property int leftMargin: 35 property int leftMargin: 35
property int rightMargin: 35 property int rightMargin: 35
property int width: 480 property int width: 480
property QtObject input: QtObject {
property int spacing: 6
property QtObject legend: QtObject {
property color color: Colors.j
property int fontSize: 10
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment