fix: fix language list view scrollbar and binding loop
This commit is contained in:
parent
3813a1a330
commit
012b5dc8a0
|
@ -18,39 +18,37 @@ ModalPopup {
|
|||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
ButtonGroup {
|
||||
id: languageGroup
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.bigPadding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||
clip: true
|
||||
|
||||
ButtonGroup {
|
||||
id: languageGroup
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: languagesListView
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.leftMargin: Style.current.padding
|
||||
model: Locales_JSON.locales
|
||||
spacing: 0
|
||||
|
||||
delegate: Component {
|
||||
StatusRadioButtonRow {
|
||||
height: 64
|
||||
anchors.rightMargin: 0
|
||||
text: modelData.name
|
||||
buttonGroup: languageGroup
|
||||
checked: appSettings.locale === modelData.locale
|
||||
onRadioCheckedChanged: {
|
||||
if (checked) {
|
||||
if (checked && appSettings.locale !== modelData.locale) {
|
||||
profileModel.changeLocale(modelData.locale)
|
||||
appSettings.locale = modelData.locale
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue