mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
advancedsettings: prevent resetting scroll bar position multiple times
Gitlab: #299 Change-Id: Ibec25839ba92925364585f1d2c2b3a51348fc273
This commit is contained in:
parent
9c073f6327
commit
7ca65dd043
2 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue