Commit 7af53010 authored by Nate Graham's avatar Nate Graham
Browse files

applets/keyboardlayout: use static text to describe display options

Currently, the Keyboard Layout widget's config window tries very hard to
be clever, by showing text or the flag for the current language as the
display options. Unfortunately this cleverness comes at the expense of
introducing bugs:

1. By forcing the text to be uppercase, the text display no longer
   reflects the reality of what the text will look like in the applet.
2. By showing the current layout's actual flag, the display will look
   broken if the current layout does not set a flag.
3. Using dynamic text and icons here in general is confusing and
   violated the HIG which counsels to use static text for options.

Let's go back to boring static text which always works.
parent 9b0e5d03
Pipeline #217304 passed with stage
in 4 minutes and 7 seconds
......@@ -16,23 +16,12 @@ Kirigami.FormLayout {
id: showLabel
Kirigami.FormData.label: i18n("Display style:")
checked: true
text: layoutShortName.toUpperCase()
text: i18nc("@option:radio", "Language code")
}
RadioButton {
id: showFlag
contentItem: Item {
implicitWidth: flagImage.implicitWidth + showFlag.indicator.width
implicitHeight: flagImage.implicitHeight
Image {
id: flagImage
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
source: Platform.StandardPaths.locate(Platform.StandardPaths.GenericDataLocation,
"kf5/locale/countries/" + layoutShortName + "/flag.png")
}
}
text: i18nc("@option:radio", "Flag")
}
Kirigami.Separator {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment