Add autostart parameter in advanced settings

This commit is contained in:
Christophe Deschamps 2024-11-15 08:33:59 +01:00
parent 2fdddf942f
commit 351199d163
4 changed files with 41 additions and 16 deletions

View file

@ -6,8 +6,8 @@ import Linphone
Button {
id: mainItem
textSize: Typography.b2.pixelSize
textWeight: Typography.b2.weight
textSize: Typography.b3.pixelSize
textWeight: Typography.b3.weight
color: DefaultStyle.main1_100
textColor: DefaultStyle.main1_500_main
leftPadding: 12 * DefaultStyle.dp

View file

@ -95,11 +95,11 @@ Rectangle {
model: mainItem.contentModel
delegate: ColumnLayout {
Rectangle {
Layout.topMargin: 16 * DefaultStyle.dp
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
Layout.bottomMargin: 16 * DefaultStyle.dp
Layout.fillWidth: true
height: 1 * DefaultStyle.dp
color: DefaultStyle.main2_500main
color: modelData.hideTopSeparator ? 'transparent' : DefaultStyle.main2_500main
}
GridLayout {
rows: 1
@ -133,9 +133,9 @@ Rectangle {
}
}
RowLayout {
anchors.topMargin: 21 * DefaultStyle.dp
anchors.bottomMargin: 21 * DefaultStyle.dp
anchors.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp
Layout.topMargin: (modelData.hideTopMargin ? 0 : (mainItem.useVerticalLayout ? 10 : 21)) * DefaultStyle.dp
Layout.bottomMargin: 21 * DefaultStyle.dp
Layout.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
Layout.alignment: Qt.AlignRight
Loader {

View file

@ -11,17 +11,23 @@ AbstractSettingsLayout {
width: parent?.width
contentModel: [
{
title: qsTr("Configuration distante"),
title: qsTr("Système"),
subTitle: "",
contentComponent: remoteProvisioningComponent
contentComponent: systemComponent
},
{
title: qsTr("Codecs Audio"),
title: qsTr("Configuration distante"),
subTitle: "",
contentComponent: remoteProvisioningComponent,
hideTopSeparator: true
},
{
title: qsTr("Codecs audio"),
subTitle: "",
contentComponent: audioCodecsComponent,
},
{
title: qsTr("Codecs Vidéo"),
title: qsTr("Codecs vidéo"),
subTitle: "",
contentComponent: videoCodecsComponent
},
@ -32,13 +38,29 @@ AbstractSettingsLayout {
}
]
// System
/////////
Component {
id: systemComponent
ColumnLayout {
spacing: 40 * DefaultStyle.dp
SwitchSetting {
Layout.fillWidth: true
titleText: qsTr("Démarrer automatiquement Linphone")
propertyName: "autoStart"
propertyOwner: SettingsCpp
}
}
}
// Remote Provisioning
//////////////////////
Component {
id: remoteProvisioningComponent
ColumnLayout {
spacing: 20 * DefaultStyle.dp
spacing: 6 * DefaultStyle.dp
DecoratedTextField {
Layout.fillWidth: true
id: configUri
@ -46,6 +68,7 @@ AbstractSettingsLayout {
toValidate: true
}
SmallButton {
Layout.topMargin: -20 * DefaultStyle.dp
Layout.alignment: Qt.AlignRight
text: qsTr("Télécharger et appliquer")
onClicked: {
@ -59,7 +82,7 @@ AbstractSettingsLayout {
}
}
//Audio codecs
// Audio codecs
//////////////
Component {
@ -81,7 +104,7 @@ AbstractSettingsLayout {
}
}
//Video codecs
// Video codecs
//////////////
Component {

View file

@ -12,12 +12,14 @@ AbstractSettingsLayout {
{
title: qsTr("Annuaires LDAP"),
subTitle: qsTr("Ajouter vos annuaires LDAP pour pouvoir effectuer des recherches dans la magic search bar."),
contentComponent: ldapParametersComponent
contentComponent: ldapParametersComponent,
hideTopMargin: true
},
{
title: qsTr("Carnet d'adresse CardDAV"),
subTitle: qsTr("Ajouter un carnet dadresse CardDAV pour synchroniser vos contacts Linphone avec un carnet dadresse tiers."),
contentComponent: cardDavParametersComponent
contentComponent: cardDavParametersComponent,
hideTopMargin: true
}
]