fix(LanguageView): simplify the radio buttons handling

- pull in required StatusQ changes (see status-im/StatusQ#882)
- simplify the radio buttons handling, no need for a ButtonGroup as they
share the same parent
- the radio buttons have the desired font size as a result ;)
This commit is contained in:
Lukáš Tinkl 2022-09-05 11:39:59 +02:00 committed by Lukáš Tinkl
parent 4026d3c60d
commit f4a6fa8012
2 changed files with 7 additions and 17 deletions

@ -1 +1 @@
Subproject commit 98d0d2163e4c49a374be204c88a8269530c68089
Subproject commit 32db0bb023509cdeb66736b19c266740397320fd

View File

@ -111,8 +111,8 @@ SettingsContentBase {
property string newKey
function descriptionForState(state) {
if (state == Constants.translationsState.alpha) return qsTr("Alpha languages")
if (state == Constants.translationsState.beta) return qsTr("Beta languages")
if (state === Constants.translationsState.alpha) return qsTr("Alpha languages")
if (state === Constants.translationsState.beta) return qsTr("Beta languages")
return ""
}
@ -202,23 +202,18 @@ SettingsContentBase {
}
StatusRadioButton {
id: ddmmyyFormat
ButtonGroup.group: dateFormatGroup
text: qsTr("DD/MM/YY")
font.pixelSize: 13
checked: root.languageStore.isDDMMYYDateFormat
onCheckedChanged: root.languageStore.setIsDDMMYYDateFormat(checked)
onToggled: root.languageStore.setIsDDMMYYDateFormat(checked)
}
StatusRadioButton {
id: mmddyyFormat
ButtonGroup.group: dateFormatGroup
text: qsTr("MM/DD/YY")
font.pixelSize: 13
checked: !root.languageStore.isDDMMYYDateFormat
onToggled: root.languageStore.setIsDDMMYYDateFormat(!checked)
}
ButtonGroup { id: dateFormatGroup }
}
// Time format options:
@ -236,23 +231,18 @@ SettingsContentBase {
}
StatusRadioButton {
id: h24Format
ButtonGroup.group: timeFormatGroup
text: qsTr("24-Hour Time")
font.pixelSize: 13
checked: root.languageStore.is24hTimeFormat
onCheckedChanged: root.languageStore.setIs24hTimeFormat(checked)
onToggled: root.languageStore.setIs24hTimeFormat(checked)
}
StatusRadioButton {
id: h12Format
ButtonGroup.group: timeFormatGroup
text: qsTr("12-Hour Time")
font.pixelSize: 13
checked: !root.languageStore.is24hTimeFormat
onToggled: root.languageStore.setIs24hTimeFormat(!checked)
}
ButtonGroup { id: timeFormatGroup }
}
// TEMPORARY: It should be removed as it is only used in Linux OS but it must be investigated how to change language in execution time, as well, in Linux (will be addressed in another task)