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

This commit is contained in:
Ronan Abhamon 2017-03-06 11:50:31 +01:00
parent 455424887d
commit 83bf254d39
3 changed files with 18 additions and 35 deletions

View file

@ -17,6 +17,7 @@ Column {
ColumnLayout {
spacing: FormStyle.header.spacing
visible: parent.title.length > 0
width: parent.width
Text {

View file

@ -1,5 +1,4 @@
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import Linphone 1.0
@ -31,39 +30,31 @@ DialogPlus {
// ---------------------------------------------------------------------------
Column {
Form {
orientation: Qt.Vertical
anchors {
fill: parent
left: parent.left
leftMargin: ManageAccountsStyle.leftMargin
right: parent.right
rightMargin: ManageAccountsStyle.rightMargin
}
spacing: ManageAccountsStyle.input.spacing
FormLine {
FormGroup {
label: qsTr('selectAccountLabel')
Text {
color: ManageAccountsStyle.input.legend.color
elide: Text.ElideRight
ComboBox {
currentIndex: Utils.findIndex(AccountSettingsModel.accounts, function (account) {
return account.sipAddress === AccountSettingsModel.sipAddress
})
font {
bold: true
pointSize: ManageAccountsStyle.input.legend.fontSize
model: AccountSettingsModel.accounts
textRole: 'sipAddress'
onActivated: AccountSettingsModel.setDefaultProxyConfig(model[index].proxyConfig)
}
}
text: qsTr('selectAccountLabel')
}
ComboBox {
id: email
currentIndex: Utils.findIndex(AccountSettingsModel.accounts, function (account) {
return account.sipAddress === AccountSettingsModel.sipAddress
})
model: AccountSettingsModel.accounts
textRole: 'sipAddress'
width: parent.width
onActivated: AccountSettingsModel.setDefaultProxyConfig(model[index].proxyConfig)
}
}
}

View file

@ -10,13 +10,4 @@ QtObject {
property int leftMargin: 35
property int rightMargin: 35
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
}
}
}