fix language modal

This commit is contained in:
Iuri Matias 2021-03-25 14:22:04 -04:00
parent 5e0da7c1ec
commit 3813a1a330
1 changed files with 36 additions and 24 deletions

View File

@ -15,37 +15,49 @@ ModalPopup {
destroy() destroy()
} }
Column { Item {
anchors.top: parent.top anchors.fill: parent
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
anchors.leftMargin: Style.current.padding
height: 50
spacing: Style.current.padding 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 { ButtonGroup {
id: languageGroup id: languageGroup
} }
Repeater { ListView {
model: Locales_JSON.locales id: languagesListView
height: 50 anchors.fill: parent
anchors.rightMargin: Style.current.padding
model: Locales_JSON.locales
spacing: 0
StatusRadioButtonRow { delegate: Component {
text: modelData.name StatusRadioButtonRow {
buttonGroup: languageGroup height: 64
checked: appSettings.locale === modelData.locale text: modelData.name
onRadioCheckedChanged: { buttonGroup: languageGroup
if (checked) { checked: appSettings.locale === modelData.locale
profileModel.changeLocale(modelData.locale) onRadioCheckedChanged: {
appSettings.locale = modelData.locale if (checked) {
profileModel.changeLocale(modelData.locale)
appSettings.locale = modelData.locale
}
}
} }
} }
} }
} }
} }
} }