mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
settingsview: make all areas of settings view scrollable
Also, it comes with little ui fixes: 1. Advanced sip security settings, tls version comboBox geometry fix 2. Margin between account deletion button and user identity for sip account Gitlab: #104 Change-Id: Ia9af7a7031e3ab8221b77b7c1f06b2f3aeb4528d
This commit is contained in:
parent
8a064c3a64
commit
c821c75443
15 changed files with 385 additions and 403 deletions
|
@ -91,6 +91,7 @@ Item {
|
||||||
property int menuFontSize: 12
|
property int menuFontSize: 12
|
||||||
|
|
||||||
property int maximumWidthSettingsView: 600
|
property int maximumWidthSettingsView: 600
|
||||||
|
property int settingsHeaderpreferredHeight: 64
|
||||||
property int preferredFieldWidth: 256
|
property int preferredFieldWidth: 256
|
||||||
property int preferredFieldHeight: 32
|
property int preferredFieldHeight: 32
|
||||||
property int preferredMarginSize: 16
|
property int preferredMarginSize: 16
|
||||||
|
|
|
@ -134,6 +134,7 @@ Rectangle {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: settingsViewRect
|
id: settingsViewRect
|
||||||
|
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
|
|
||||||
signal stopAudioMeter
|
signal stopAudioMeter
|
||||||
|
@ -151,79 +152,132 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StackLayout {
|
SettingsHeader {
|
||||||
id: rightSettingsWidget
|
id: settingsHeader
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.top: settingsViewRect.top
|
||||||
|
anchors.left: settingsViewRect.left
|
||||||
|
anchors.leftMargin: {
|
||||||
|
var pageWidth = rightSettingsStackLayout.itemAt(
|
||||||
|
rightSettingsStackLayout.currentIndex).contentWidth
|
||||||
|
return (settingsViewRect.width - pageWidth) / 2 + JamiTheme.preferredMarginSize
|
||||||
|
}
|
||||||
|
|
||||||
property int pageIdCurrentAccountSettingsPage: 0
|
height: JamiTheme.settingsHeaderpreferredHeight
|
||||||
property int pageIdGeneralSettingsPage: 1
|
|
||||||
property int pageIdAvSettingPage: 2
|
|
||||||
property int pageIdPluginSettingsPage: 3
|
|
||||||
|
|
||||||
currentIndex: {
|
title: {
|
||||||
switch(selectedMenu){
|
switch(selectedMenu){
|
||||||
case SettingsView.Account:
|
case SettingsView.Account:
|
||||||
return pageIdCurrentAccountSettingsPage
|
return qsTr("Account Settings")
|
||||||
case SettingsView.General:
|
case SettingsView.General:
|
||||||
return pageIdGeneralSettingsPage
|
return qsTr("General")
|
||||||
case SettingsView.Media:
|
case SettingsView.Media:
|
||||||
return pageIdAvSettingPage
|
return JamiStrings.avSettingsTitle
|
||||||
case SettingsView.Plugin:
|
case SettingsView.Plugin:
|
||||||
return pageIdPluginSettingsPage
|
return qsTr("Plugin")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// current account setting scroll page, index 0
|
onBackArrowClicked: root.settingsBackArrowClicked()
|
||||||
CurrentAccountSettings {
|
}
|
||||||
id: pageIdCurrentAccountSettings
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
ScrollView {
|
||||||
Layout.fillWidth: true
|
id: settingsViewScrollView
|
||||||
|
|
||||||
isSIP: settingsViewRect.isSIP
|
property ScrollBar vScrollBar: ScrollBar.vertical
|
||||||
|
|
||||||
onNavigateToMainView: {
|
anchors.top: settingsHeader.bottom
|
||||||
leaveSettingsSlot(true)
|
anchors.horizontalCenter: settingsViewRect.horizontalCenter
|
||||||
|
|
||||||
|
height: settingsViewRect.height - settingsHeader.height
|
||||||
|
width: settingsViewRect.width
|
||||||
|
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
contentHeight: rightSettingsStackLayout.height
|
||||||
|
|
||||||
|
StackLayout {
|
||||||
|
id: rightSettingsStackLayout
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
width: settingsViewScrollView.width
|
||||||
|
|
||||||
|
property int pageIdCurrentAccountSettingsPage: 0
|
||||||
|
property int pageIdGeneralSettingsPage: 1
|
||||||
|
property int pageIdAvSettingPage: 2
|
||||||
|
property int pageIdPluginSettingsPage: 3
|
||||||
|
|
||||||
|
currentIndex: {
|
||||||
|
switch(selectedMenu){
|
||||||
|
case SettingsView.Account:
|
||||||
|
return pageIdCurrentAccountSettingsPage
|
||||||
|
case SettingsView.General:
|
||||||
|
return pageIdGeneralSettingsPage
|
||||||
|
case SettingsView.Media:
|
||||||
|
return pageIdAvSettingPage
|
||||||
|
case SettingsView.Plugin:
|
||||||
|
return pageIdPluginSettingsPage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onNavigateToNewWizardView: {
|
Component.onCompleted: {
|
||||||
leaveSettingsSlot(false)
|
// avoid binding loop
|
||||||
|
height = Qt.binding(function (){
|
||||||
|
return Math.max(
|
||||||
|
rightSettingsStackLayout.itemAt(currentIndex).preferredHeight,
|
||||||
|
settingsViewScrollView.height)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// general setting page, index 1
|
// current account setting scroll page, index 0
|
||||||
GeneralSettingsPage {
|
CurrentAccountSettings {
|
||||||
id: generalSettings
|
id: pageIdCurrentAccountSettings
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// av setting page, index 2
|
isSIP: settingsViewRect.isSIP
|
||||||
AvSettingPage {
|
|
||||||
id: avSettings
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
onNavigateToMainView: {
|
||||||
Layout.fillWidth: true
|
leaveSettingsSlot(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// plugin setting page, index 3
|
onNavigateToNewWizardView: {
|
||||||
PluginSettingsPage {
|
leaveSettingsSlot(false)
|
||||||
id: pluginSettings
|
}
|
||||||
|
|
||||||
Layout.fillHeight: true
|
onAdvancedSettingsToggled: {
|
||||||
Layout.fillWidth: true
|
if (settingsVisible)
|
||||||
|
settingsViewScrollView.vScrollBar.position =
|
||||||
|
getAdvancedSettingsScrollPosition()
|
||||||
|
else
|
||||||
|
settingsViewScrollView.vScrollBar.position = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// general setting page, index 1
|
||||||
|
GeneralSettingsPage {
|
||||||
|
id: generalSettings
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
// av setting page, index 2
|
||||||
|
AvSettingPage {
|
||||||
|
id: avSettings
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
// plugin setting page, index 3
|
||||||
|
PluginSettingsPage {
|
||||||
|
id: pluginSettings
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Back button signal redirection
|
|
||||||
Component.onCompleted: {
|
|
||||||
pageIdCurrentAccountSettings.backArrowClicked.connect(settingsBackArrowClicked)
|
|
||||||
generalSettings.backArrowClicked.connect(settingsBackArrowClicked)
|
|
||||||
avSettings.backArrowClicked.connect(settingsBackArrowClicked)
|
|
||||||
pluginSettings.backArrowClicked.connect(settingsBackArrowClicked)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnRingtone
|
id: btnRingtone
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.selectCustomRingtone
|
titleField: JamiStrings.selectCustomRingtone
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -143,4 +143,4 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnCACert
|
id: btnCACert
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.caCertificate
|
titleField: JamiStrings.caCertificate
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -147,7 +147,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnUserCert
|
id: btnUserCert
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.userCertificate
|
titleField: JamiStrings.userCertificate
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -158,7 +158,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnPrivateKey
|
id: btnPrivateKey
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.privateKey
|
titleField: JamiStrings.privateKey
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -175,4 +175,4 @@ ColumnLayout {
|
||||||
titleField: JamiStrings.privateKeyPassword
|
titleField: JamiStrings.privateKeyPassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnSIPCACert
|
id: btnSIPCACert
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.caCertificate
|
titleField: JamiStrings.caCertificate
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -213,7 +213,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnSIPUserCert
|
id: btnSIPUserCert
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.userCertificate
|
titleField: JamiStrings.userCertificate
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -224,7 +224,7 @@ ColumnLayout {
|
||||||
SettingMaterialButton {
|
SettingMaterialButton {
|
||||||
id: btnSIPPrivateKey
|
id: btnSIPPrivateKey
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.minimumHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.privateKey
|
titleField: JamiStrings.privateKey
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
@ -282,7 +282,6 @@ ColumnLayout {
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
labelText: JamiStrings.tlsProtocol
|
labelText: JamiStrings.tlsProtocol
|
||||||
fontPointSize: JamiTheme.settingsFontSize
|
fontPointSize: JamiTheme.settingsFontSize
|
||||||
|
@ -326,4 +325,4 @@ ColumnLayout {
|
||||||
onNewValue: SettingsAdapter.negotiationTimeoutSpinBoxValueChanged(valueField)
|
onNewValue: SettingsAdapter.negotiationTimeoutSpinBoxValueChanged(valueField)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,7 @@ ColumnLayout {
|
||||||
|
|
||||||
property bool isSIP
|
property bool isSIP
|
||||||
property int itemWidth
|
property int itemWidth
|
||||||
|
property alias settingsVisible: advancedSettingsView.visible
|
||||||
signal scrolled
|
|
||||||
|
|
||||||
function updateAdvancedAccountInfos() {
|
function updateAdvancedAccountInfos() {
|
||||||
advancedCallSettings.updateCallSettingsInfos()
|
advancedCallSettings.updateCallSettingsInfos()
|
||||||
|
@ -90,77 +89,87 @@ ColumnLayout {
|
||||||
advancedSettingsView.visible = !advancedSettingsView.visible
|
advancedSettingsView.visible = !advancedSettingsView.visible
|
||||||
if(advancedSettingsView.visible)
|
if(advancedSettingsView.visible)
|
||||||
updateAdvancedAccountInfos()
|
updateAdvancedAccountInfos()
|
||||||
scrolled()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: advancedSettingsView
|
id: advancedSettingsView
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
AdvancedCallSettings {
|
AdvancedCallSettings {
|
||||||
id: advancedCallSettings
|
id: advancedCallSettings
|
||||||
isSIP: root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
isSIP: root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedVoiceMailSettings {
|
AdvancedVoiceMailSettings {
|
||||||
id: advancedVoiceMailSettings
|
id: advancedVoiceMailSettings
|
||||||
visible: root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedSIPSecuritySettings {
|
AdvancedSIPSecuritySettings {
|
||||||
id: advancedSIPSecuritySettings
|
id: advancedSIPSecuritySettings
|
||||||
visible: root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedNameServerSettings {
|
AdvancedNameServerSettings {
|
||||||
id: advancedNameServerSettings
|
id: advancedNameServerSettings
|
||||||
visible: !root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: !root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedOpenDHTSettings {
|
AdvancedOpenDHTSettings {
|
||||||
id: advancedOpenDHTSettings
|
id: advancedOpenDHTSettings
|
||||||
visible: !root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: !root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedJamiSecuritySettings {
|
AdvancedJamiSecuritySettings {
|
||||||
id: advancedJamiSecuritySettings
|
id: advancedJamiSecuritySettings
|
||||||
visible: !root.isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: !root.isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedConnectivitySettings {
|
AdvancedConnectivitySettings {
|
||||||
id: advancedConnectivitySettings
|
id: advancedConnectivitySettings
|
||||||
itemWidth: root.itemWidth
|
|
||||||
isSIP: root.isSIP
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
itemWidth: root.itemWidth
|
||||||
|
isSIP: root.isSIP
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedPublicAddressSettings {
|
AdvancedPublicAddressSettings {
|
||||||
id: advancedPublicAddressSettings
|
id: advancedPublicAddressSettings
|
||||||
visible: isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedMediaSettings {
|
AdvancedMediaSettings {
|
||||||
|
@ -171,10 +180,11 @@ ColumnLayout {
|
||||||
|
|
||||||
AdvancedSDPSettings {
|
AdvancedSDPSettings {
|
||||||
id: advancedSDPStettings
|
id: advancedSDPStettings
|
||||||
visible: isSIP
|
|
||||||
itemWidth: root.itemWidth
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: isSIP
|
||||||
|
itemWidth: root.itemWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ ColumnLayout {
|
||||||
id: inputComboBoxSetting
|
id: inputComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.microphone
|
labelText: JamiStrings.microphone
|
||||||
|
@ -118,7 +118,9 @@ ColumnLayout {
|
||||||
|
|
||||||
onIndexChanged: {
|
onIndexChanged: {
|
||||||
stopAudioMeter(false)
|
stopAudioMeter(false)
|
||||||
var selectedInputDeviceName = comboModel.data(comboModel.index( modelIndex, 0), AudioInputDeviceModel.Device_ID)
|
var selectedInputDeviceName = comboModel.data(
|
||||||
|
comboModel.index(modelIndex, 0),
|
||||||
|
AudioInputDeviceModel.Device_ID)
|
||||||
AVModel.setInputDevice(selectedInputDeviceName)
|
AVModel.setInputDevice(selectedInputDeviceName)
|
||||||
startAudioMeter(false)
|
startAudioMeter(false)
|
||||||
}
|
}
|
||||||
|
@ -141,7 +143,7 @@ ColumnLayout {
|
||||||
id: outputComboBoxSetting
|
id: outputComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.outputDevice
|
labelText: JamiStrings.outputDevice
|
||||||
|
@ -153,7 +155,9 @@ ColumnLayout {
|
||||||
|
|
||||||
onIndexChanged: {
|
onIndexChanged: {
|
||||||
stopAudioMeter(false)
|
stopAudioMeter(false)
|
||||||
var selectedOutputDeviceName = audioOutputDeviceModel.data(audioOutputDeviceModel.index( modelIndex, 0), AudioOutputDeviceModel.Device_ID)
|
var selectedOutputDeviceName = audioOutputDeviceModel.data(
|
||||||
|
audioOutputDeviceModel.index(modelIndex, 0),
|
||||||
|
AudioOutputDeviceModel.Device_ID)
|
||||||
AVModel.setOutputDevice(selectedOutputDeviceName)
|
AVModel.setOutputDevice(selectedOutputDeviceName)
|
||||||
startAudioMeter(false)
|
startAudioMeter(false)
|
||||||
}
|
}
|
||||||
|
@ -163,7 +167,7 @@ ColumnLayout {
|
||||||
id: ringtoneDeviceComboBoxSetting
|
id: ringtoneDeviceComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.ringtoneDevice
|
labelText: JamiStrings.ringtoneDevice
|
||||||
|
@ -175,7 +179,9 @@ ColumnLayout {
|
||||||
|
|
||||||
onIndexChanged: {
|
onIndexChanged: {
|
||||||
stopAudioMeter(false)
|
stopAudioMeter(false)
|
||||||
var selectedRingtoneDeviceName = audioOutputDeviceModel.data(audioOutputDeviceModel.index( modelIndex, 0), AudioOutputDeviceModel.Device_ID)
|
var selectedRingtoneDeviceName = audioOutputDeviceModel.data(
|
||||||
|
audioOutputDeviceModel.index(modelIndex, 0),
|
||||||
|
AudioOutputDeviceModel.Device_ID)
|
||||||
AVModel.setRingtoneDevice(selectedRingtoneDeviceName)
|
AVModel.setRingtoneDevice(selectedRingtoneDeviceName)
|
||||||
startAudioMeter(false)
|
startAudioMeter(false)
|
||||||
}
|
}
|
||||||
|
@ -185,7 +191,7 @@ ColumnLayout {
|
||||||
id: audioManagerComboBoxSetting
|
id: audioManagerComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.audioManager
|
labelText: JamiStrings.audioManager
|
||||||
|
@ -196,7 +202,8 @@ ColumnLayout {
|
||||||
|
|
||||||
onIndexChanged: {
|
onIndexChanged: {
|
||||||
stopAudioMeter(false)
|
stopAudioMeter(false)
|
||||||
var selectedAudioManager = comboModel.data(comboModel.index( modelIndex, 0), AudioManagerListModel.AudioManagerID)
|
var selectedAudioManager = comboModel.data(
|
||||||
|
comboModel.index(modelIndex, 0), AudioManagerListModel.AudioManagerID)
|
||||||
AVModel.setAudioManager(selectedAudioManager)
|
AVModel.setAudioManager(selectedAudioManager)
|
||||||
startAudioMeter(false)
|
startAudioMeter(false)
|
||||||
populateAudioSettings()
|
populateAudioSettings()
|
||||||
|
|
|
@ -32,8 +32,8 @@ Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property int preferredColumnWidth: Math.min(root.width / 2 - 50, 275)
|
property int preferredColumnWidth: Math.min(root.width / 2 - 50, 275)
|
||||||
|
property int contentWidth: avSettingsColumnLayout.width
|
||||||
signal backArrowClicked
|
property int preferredHeight: avSettingsColumnLayout.implicitHeight
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
|
@ -48,60 +48,33 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: avSettingsColumnLayout
|
||||||
|
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
|
|
||||||
height: root.height
|
height: root.height
|
||||||
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
||||||
|
|
||||||
SettingsHeader {
|
// Audio
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
AudioSettings {
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
id: audioSettings
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 64
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
title: JamiStrings.avSettingsTitle
|
itemWidth: preferredColumnWidth
|
||||||
|
|
||||||
onBackArrowClicked: root.backArrowClicked()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
// Video
|
||||||
id: avSettingsScrollView
|
VideoSettings {
|
||||||
|
id: videoSettings
|
||||||
|
|
||||||
property ScrollBar vScrollBar: ScrollBar.vertical
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
focus: true
|
itemWidth: preferredColumnWidth
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
width: avSettingsScrollView.width
|
|
||||||
|
|
||||||
// Audio
|
|
||||||
AudioSettings {
|
|
||||||
id: audioSettings
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
// Video
|
|
||||||
VideoSettings {
|
|
||||||
id: videoSettings
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,11 +36,13 @@ Rectangle {
|
||||||
|
|
||||||
property bool isSIP
|
property bool isSIP
|
||||||
|
|
||||||
|
property int contentWidth: currentAccountSettingsColumnLayout.width
|
||||||
|
property int preferredHeight: currentAccountSettingsColumnLayout.implicitHeight
|
||||||
property int preferredColumnWidth : Math.min(root.width / 2 - 50, 350)
|
property int preferredColumnWidth : Math.min(root.width / 2 - 50, 350)
|
||||||
|
|
||||||
signal navigateToMainView
|
signal navigateToMainView
|
||||||
signal navigateToNewWizardView
|
signal navigateToNewWizardView
|
||||||
signal backArrowClicked
|
signal advancedSettingsToggled(bool settingsVisible)
|
||||||
|
|
||||||
function isPhotoBoothOpened() {
|
function isPhotoBoothOpened() {
|
||||||
return accountProfile.isPhotoBoothOpened()
|
return accountProfile.isPhotoBoothOpened()
|
||||||
|
@ -86,6 +88,9 @@ Rectangle {
|
||||||
bannedContacts.connectCurrentAccount(false)
|
bannedContacts.connectCurrentAccount(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAdvancedSettingsScrollPosition() {
|
||||||
|
return advancedSettings.y / currentAccountSettingsColumnLayout.height
|
||||||
|
}
|
||||||
|
|
||||||
function setPasswordButtonText() {
|
function setPasswordButtonText() {
|
||||||
var hasPassword = AccountAdapter.hasPassword()
|
var hasPassword = AccountAdapter.hasPassword()
|
||||||
|
@ -175,176 +180,148 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: currentAccountSettingsColumnLayout
|
||||||
|
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
|
|
||||||
height: root.height
|
height: root.height
|
||||||
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
||||||
|
|
||||||
SettingsHeader {
|
ToggleSwitch {
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
id: accountEnableCheckBox
|
||||||
|
|
||||||
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.fillWidth: true
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.preferredHeight: 64
|
|
||||||
|
|
||||||
title: qsTr("Account Settings")
|
labelText: JamiStrings.enableAccount
|
||||||
|
fontPointSize: JamiTheme.headerFontSize
|
||||||
|
|
||||||
onBackArrowClicked: root.backArrowClicked()
|
onSwitchToggled: AccountAdapter.model.setAccountEnabled(
|
||||||
|
AccountAdapter.currentAccountId, checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
AccountProfile {
|
||||||
id: scrollView
|
id: accountProfile
|
||||||
|
|
||||||
property ScrollBar vScrollBar: ScrollBar.vertical
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
}
|
||||||
|
|
||||||
focus: true
|
UserIdentity {
|
||||||
clip: true
|
id: userIdentity
|
||||||
|
isSIP: root.isSIP
|
||||||
|
|
||||||
ColumnLayout {
|
Layout.fillWidth: true
|
||||||
id: accountLayout
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
width: scrollView.width
|
itemWidth: preferredColumnWidth
|
||||||
|
}
|
||||||
|
|
||||||
ToggleSwitch {
|
MaterialButton {
|
||||||
id: accountEnableCheckBox
|
id: passwdPushButton
|
||||||
|
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
labelText: JamiStrings.enableAccount
|
color: JamiTheme.buttonTintedBlack
|
||||||
fontPointSize: JamiTheme.headerFontSize
|
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
||||||
|
pressedColor: JamiTheme.buttonTintedBlackPressed
|
||||||
|
outlined: true
|
||||||
|
|
||||||
onSwitchToggled: AccountAdapter.model.setAccountEnabled(
|
toolTipText: AccountAdapter.hasPassword() ?
|
||||||
AccountAdapter.currentAccountId, checked)
|
JamiStrings.changeCurrentPassword : JamiStrings.setAPassword
|
||||||
}
|
text: AccountAdapter.hasPassword() ? JamiStrings.changePassword : JamiStrings.setPassword
|
||||||
|
|
||||||
AccountProfile {
|
source: "qrc:/images/icons/round-edit-24px.svg"
|
||||||
id: accountProfile
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
onClicked: {
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
passwordClicked()
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
}
|
|
||||||
|
|
||||||
UserIdentity {
|
|
||||||
id: userIdentity
|
|
||||||
isSIP: root.isSIP
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialButton {
|
|
||||||
id: passwdPushButton
|
|
||||||
|
|
||||||
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
|
||||||
|
|
||||||
color: JamiTheme.buttonTintedBlack
|
|
||||||
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
|
||||||
pressedColor: JamiTheme.buttonTintedBlackPressed
|
|
||||||
outlined: true
|
|
||||||
|
|
||||||
toolTipText: AccountAdapter.hasPassword() ?
|
|
||||||
JamiStrings.changeCurrentPassword : JamiStrings.setAPassword
|
|
||||||
text: AccountAdapter.hasPassword() ? JamiStrings.changePassword : JamiStrings.setPassword
|
|
||||||
|
|
||||||
source: "qrc:/images/icons/round-edit-24px.svg"
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
passwordClicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialButton {
|
|
||||||
id: btnExportAccount
|
|
||||||
|
|
||||||
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
|
||||||
|
|
||||||
color: JamiTheme.buttonTintedBlack
|
|
||||||
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
|
||||||
pressedColor: JamiTheme.buttonTintedBlackPressed
|
|
||||||
outlined: true
|
|
||||||
|
|
||||||
toolTipText: JamiStrings.tipBackupAccount
|
|
||||||
text: JamiStrings.backupAccountBtn
|
|
||||||
|
|
||||||
source: "qrc:/images/icons/round-save_alt-24px.svg"
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
exportAccountSlot()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialButton {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
color: JamiTheme.buttonTintedRed
|
|
||||||
hoveredColor: JamiTheme.buttonTintedRedHovered
|
|
||||||
pressedColor: JamiTheme.buttonTintedRedPressed
|
|
||||||
|
|
||||||
text: JamiStrings.deleteAccount
|
|
||||||
|
|
||||||
source: "qrc:/images/icons/delete_forever-24px.svg"
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
delAccountSlot()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LinkedDevices {
|
|
||||||
id: linkedDevices
|
|
||||||
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
}
|
|
||||||
|
|
||||||
BannedContacts {
|
|
||||||
id: bannedContacts
|
|
||||||
isSIP: root.isSIP
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
}
|
|
||||||
|
|
||||||
AdvancedSettings {
|
|
||||||
id: advancedSettings
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.bottomMargin: 8
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
isSIP: root.isSIP
|
|
||||||
|
|
||||||
onScrolled: scrollView.vScrollBar.position = advancedSettings.y / accountLayout.height
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaterialButton {
|
||||||
|
id: btnExportAccount
|
||||||
|
|
||||||
|
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
|
color: JamiTheme.buttonTintedBlack
|
||||||
|
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
||||||
|
pressedColor: JamiTheme.buttonTintedBlackPressed
|
||||||
|
outlined: true
|
||||||
|
|
||||||
|
toolTipText: JamiStrings.tipBackupAccount
|
||||||
|
text: JamiStrings.backupAccountBtn
|
||||||
|
|
||||||
|
source: "qrc:/images/icons/round-save_alt-24px.svg"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
exportAccountSlot()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialButton {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
Layout.topMargin: isSIP ? JamiTheme.preferredMarginSize : 0
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
|
color: JamiTheme.buttonTintedRed
|
||||||
|
hoveredColor: JamiTheme.buttonTintedRedHovered
|
||||||
|
pressedColor: JamiTheme.buttonTintedRedPressed
|
||||||
|
|
||||||
|
text: JamiStrings.deleteAccount
|
||||||
|
|
||||||
|
source: "qrc:/images/icons/delete_forever-24px.svg"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
delAccountSlot()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LinkedDevices {
|
||||||
|
id: linkedDevices
|
||||||
|
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
}
|
||||||
|
|
||||||
|
BannedContacts {
|
||||||
|
id: bannedContacts
|
||||||
|
isSIP: root.isSIP
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
}
|
||||||
|
|
||||||
|
AdvancedSettings {
|
||||||
|
id: advancedSettings
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.bottomMargin: 8
|
||||||
|
|
||||||
|
itemWidth: preferredColumnWidth
|
||||||
|
isSIP: root.isSIP
|
||||||
|
|
||||||
|
onHeightChanged: advancedSettingsToggled(settingsVisible)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,66 +32,43 @@ Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property int preferredColumnWidth : Math.min(root.width / 2 - 50, 350)
|
property int preferredColumnWidth : Math.min(root.width / 2 - 50, 350)
|
||||||
|
property int contentWidth: generalSettingsColumnLayout.width
|
||||||
signal backArrowClicked
|
property int preferredHeight: generalSettingsColumnLayout.implicitHeight
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: generalSettingsColumnLayout
|
||||||
|
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
|
|
||||||
height: root.height
|
height: root.height
|
||||||
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
||||||
|
|
||||||
SettingsHeader {
|
// system setting panel
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
SystemSettings {
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 64
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
title: qsTr("General")
|
itemWidth: preferredColumnWidth
|
||||||
|
|
||||||
onBackArrowClicked: root.backArrowClicked()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
// call recording setting panel
|
||||||
id: generalSettingsScrollView
|
RecordingSettings {
|
||||||
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
focus: true
|
itemWidth: preferredColumnWidth
|
||||||
clip: true
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
// update setting panel
|
||||||
width: generalSettingsScrollView.width
|
UpdateSettings {
|
||||||
|
Layout.fillWidth: true
|
||||||
// system setting panel
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
SystemSettings {
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.fillWidth: true
|
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
visible: Qt.platform.os == "windows"? true : false
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
// call recording setting panel
|
|
||||||
RecordingSettings {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
itemWidth: preferredColumnWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
// update setting panel
|
|
||||||
UpdateSettings {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
|
||||||
visible: Qt.platform.os == "windows"? true : false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,9 @@ import "../../commoncomponents"
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property int contentWidth: pluginSettingsColumnLayout.width
|
||||||
|
property int preferredHeight: pluginSettingsColumnLayout.implicitHeight
|
||||||
|
|
||||||
function populatePluginSettings() {
|
function populatePluginSettings() {
|
||||||
enabledplugin.checked = PluginModel.getPluginsEnabled()
|
enabledplugin.checked = PluginModel.getPluginsEnabled()
|
||||||
pluginListSettingsView.visible = enabledplugin.checked
|
pluginListSettingsView.visible = enabledplugin.checked
|
||||||
|
@ -38,82 +41,62 @@ Rectangle {
|
||||||
PluginModel.setPluginsEnabled(state)
|
PluginModel.setPluginsEnabled(state)
|
||||||
}
|
}
|
||||||
|
|
||||||
signal backArrowClicked
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: pluginSettingsColumnLayout
|
||||||
|
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
|
|
||||||
height: root.height
|
height: root.height
|
||||||
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
||||||
|
|
||||||
SettingsHeader {
|
ToggleSwitch {
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
id: enabledplugin
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.fillWidth: true
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.preferredHeight: 64
|
|
||||||
|
|
||||||
title: qsTr("Plugin")
|
labelText: "Enable"
|
||||||
|
fontPointSize: JamiTheme.headerFontSize
|
||||||
|
|
||||||
onBackArrowClicked: root.backArrowClicked()
|
onSwitchToggled: {
|
||||||
}
|
slotSetPluginEnabled(checked)
|
||||||
|
|
||||||
ScrollView {
|
pluginListSettingsView.visible = checked
|
||||||
id: pluginScrollView
|
if (!pluginListSettingsView.visible) {
|
||||||
|
PluginModel.toggleCallMediaHandler("", true)
|
||||||
Layout.fillHeight: true
|
pluginListSettingsView.hidePreferences()
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
focus: true
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
width: pluginScrollView.width
|
|
||||||
|
|
||||||
ToggleSwitch {
|
|
||||||
id: enabledplugin
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
labelText: "Enable"
|
|
||||||
fontPointSize: JamiTheme.headerFontSize
|
|
||||||
|
|
||||||
onSwitchToggled: {
|
|
||||||
slotSetPluginEnabled(checked)
|
|
||||||
|
|
||||||
pluginListSettingsView.visible = checked
|
|
||||||
if (!pluginListSettingsView.visible) {
|
|
||||||
PluginModel.toggleCallMediaHandler("", true)
|
|
||||||
pluginListSettingsView.hidePreferences()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PluginListSettingsView {
|
|
||||||
id: pluginListSettingsView
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
pluginListPreferencesView: pluginListPreferencesView
|
|
||||||
|
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.minimumHeight: 0
|
|
||||||
Layout.preferredHeight: childrenRect.height
|
|
||||||
}
|
|
||||||
|
|
||||||
PluginListPreferencesView {
|
|
||||||
id: pluginListPreferencesView
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
|
||||||
Layout.minimumHeight: 0
|
|
||||||
Layout.preferredHeight: childrenRect.height
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PluginListSettingsView {
|
||||||
|
id: pluginListSettingsView
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
|
pluginListPreferencesView: pluginListPreferencesView
|
||||||
|
|
||||||
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.minimumHeight: 0
|
||||||
|
Layout.preferredHeight: childrenRect.height
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginListPreferencesView {
|
||||||
|
id: pluginListPreferencesView
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.minimumHeight: 0
|
||||||
|
Layout.preferredHeight: childrenRect.height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ ColumnLayout {
|
||||||
id: recordPathButton
|
id: recordPathButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
Layout.fillHeight: true
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.preferredWidth: itemWidth
|
Layout.preferredWidth: itemWidth
|
||||||
|
|
||||||
toolTipText: JamiStrings.tipRecordFolder
|
toolTipText: JamiStrings.tipRecordFolder
|
||||||
|
|
|
@ -52,17 +52,19 @@ RowLayout {
|
||||||
|
|
||||||
ElidedTextLabel {
|
ElidedTextLabel {
|
||||||
id: label
|
id: label
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: heightOfLayout
|
Layout.preferredHeight: heightOfLayout
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
Layout.rightMargin: JamiTheme.preferredMarginSize / 2
|
||||||
|
|
||||||
eText: qsTr(labelText)
|
eText: qsTr(labelText)
|
||||||
fontSize: JamiTheme.settingsFontSize
|
fontSize: JamiTheme.settingsFontSize
|
||||||
maxWidth: width
|
maxWidth: widthOfComboBox
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingParaCombobox {
|
SettingParaCombobox {
|
||||||
id: comboBoxOfLayout
|
id: comboBoxOfLayout
|
||||||
|
|
||||||
Layout.preferredWidth: widthOfComboBox
|
Layout.preferredWidth: widthOfComboBox
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ ColumnLayout {
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
Layout.preferredWidth: itemWidth
|
Layout.preferredWidth: itemWidth
|
||||||
Layout.fillHeight: true
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
toolTipText: JamiStrings.tipChooseDownloadFolder
|
toolTipText: JamiStrings.tipChooseDownloadFolder
|
||||||
text: downloadPath
|
text: downloadPath
|
||||||
|
|
|
@ -155,7 +155,7 @@ ColumnLayout {
|
||||||
id: deviceComboBoxSetting
|
id: deviceComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.device
|
labelText: JamiStrings.device
|
||||||
|
@ -174,7 +174,7 @@ ColumnLayout {
|
||||||
id: resolutionComboBoxSetting
|
id: resolutionComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.resolution
|
labelText: JamiStrings.resolution
|
||||||
|
@ -193,7 +193,7 @@ ColumnLayout {
|
||||||
id: fpsComboBoxSetting
|
id: fpsComboBoxSetting
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
labelText: JamiStrings.fps
|
labelText: JamiStrings.fps
|
||||||
|
@ -227,22 +227,21 @@ ColumnLayout {
|
||||||
// video Preview
|
// video Preview
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectBox
|
id: rectBox
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.maximumHeight: width * aspectRatio
|
|
||||||
Layout.minimumHeight: width * aspectRatio
|
|
||||||
Layout.preferredHeight: width * aspectRatio
|
Layout.preferredHeight: width * aspectRatio
|
||||||
|
|
||||||
Layout.minimumWidth: 200
|
Layout.minimumWidth: 200
|
||||||
Layout.maximumWidth: 400
|
Layout.maximumWidth: 400
|
||||||
Layout.preferredWidth: itemWidth * 2
|
Layout.preferredWidth: itemWidth * 2
|
||||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
color: "white"
|
color: "white"
|
||||||
radius: 5
|
radius: 5
|
||||||
|
|
||||||
PreviewRenderer {
|
PreviewRenderer {
|
||||||
id: previewWidget
|
id: previewWidget
|
||||||
anchors.fill: rectBox
|
anchors.fill: rectBox
|
||||||
anchors.centerIn: rectBox
|
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
|
Loading…
Add table
Reference in a new issue