diff --git a/applets/digital-clock/package/contents/ui/configAppearance.qml b/applets/digital-clock/package/contents/ui/configAppearance.qml --- a/applets/digital-clock/package/contents/ui/configAppearance.qml +++ b/applets/digital-clock/package/contents/ui/configAppearance.qml @@ -24,6 +24,7 @@ import QtQuick.Controls 2.3 as QtControls import QtQuick.Layouts 1.0 as QtLayouts import org.kde.plasma.calendar 2.0 as PlasmaCalendar +import org.kde.kquickcontrolsaddons 2.0 import org.kde.kirigami 2.5 as Kirigami QtLayouts.ColumnLayout { @@ -45,7 +46,7 @@ property alias cfg_showDate: showDate.checked property string cfg_dateFormat: "shortDate" property alias cfg_customDateFormat: customDateFormat.text - property alias cfg_use24hFormat: use24hFormat.checkState + property alias cfg_use24hFormat: use24hFormat.currentIndex onCfg_fontFamilyChanged: { // HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined @@ -88,12 +89,6 @@ text: i18n("Show seconds") } - QtControls.CheckBox { - id: use24hFormat - text: i18nc("Checkbox label; means 24h clock format, without am/pm", "Use 24-hour Clock") - tristate: true - } - QtControls.CheckBox { id: showLocalTimezone text: i18n("Show local time zone") @@ -122,6 +117,31 @@ Kirigami.FormData.isSection: true } + QtLayouts.RowLayout { + QtLayouts.Layout.fillWidth: true + Kirigami.FormData.label: i18n("Time display:") + + QtControls.ComboBox { + id: use24hFormat + model: [ + i18n("12-Hour"), + i18n("Use Region Defaults"), + i18n("24-Hour") + ] + onCurrentIndexChanged: cfg_use24hFormat = currentIndex + } + + QtControls.Button { + text: i18n("Change Regional Settings...") + icon.name: "preferences-desktop-locale" + onClicked: KCMShell.open("formats.desktop") + } + } + + Item { + Kirigami.FormData.isSection: true + } + QtControls.ComboBox { id: dateFormat Kirigami.FormData.label: i18n("Date format:")