Skip to content
Snippets Groups Projects
Commit 7ca65dd0 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

advancedsettings: prevent resetting scroll bar position multiple times

Gitlab: #299

Change-Id: Ibec25839ba92925364585f1d2c2b3a51348fc273
parent 9c073f63
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ ColumnLayout {
property bool isSIP
property int itemWidth
property alias settingsVisible: advancedSettingsView.visible
signal showAdvancedSettingsRequest
function updateAdvancedAccountInfos() {
advancedCallSettings.updateCallSettingsInfos()
......@@ -90,6 +91,7 @@ ColumnLayout {
advancedSettingsView.visible = !advancedSettingsView.visible
if(advancedSettingsView.visible)
updateAdvancedAccountInfos()
showAdvancedSettingsRequest()
}
}
}
......
......@@ -85,8 +85,8 @@ Rectangle {
}
function getAdvancedSettingsScrollPosition() {
return advancedSettings.y / (currentAccountSettingsColumnLayout.height
- advancedSettings.height + 40) // 40 = btnSize+margin
return advancedSettings.height / (currentAccountSettingsColumnLayout.height
+ advancedSettings.height + 46) // 40 = btnSize+2*margin
}
function setPasswordButtonText() {
......@@ -319,7 +319,9 @@ Rectangle {
itemWidth: preferredColumnWidth
isSIP: root.isSIP
onHeightChanged: advancedSettingsToggled(settingsVisible)
onShowAdvancedSettingsRequest: {
advancedSettingsToggled(settingsVisible)
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment