diff --git a/applets/timer/package/contents/ui/configAppearance.qml b/applets/timer/package/contents/ui/configAppearance.qml --- a/applets/timer/package/contents/ui/configAppearance.qml +++ b/applets/timer/package/contents/ui/configAppearance.qml @@ -16,11 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ -import QtQuick 2.2 -import QtQuick.Controls 1.0 as QtControls -import QtQuick.Layouts 1.0 as QtLayouts +import QtQuick 2.5 +import QtQuick.Controls 2.5 as QQC2 +import QtQuick.Layouts 1.0 -QtLayouts.ColumnLayout { +import org.kde.kirigami 2.5 as Kirigami + +Kirigami.FormLayout { id: appearancePage property alias cfg_showTitle: showTitle.checked @@ -31,81 +33,61 @@ property alias cfg_showNotification: showNotification.checked property alias cfg_notificationText: notificationText.text - QtControls.GroupBox { - id: displayGroup + RowLayout { + Layout.fillWidth: true - QtLayouts.Layout.fillWidth: true - flat: true + Kirigami.FormData.label: i18nc("@title:label", "Display:") - title: i18nc("@title:group", "Display") + QQC2.CheckBox { + id: showTitle - QtLayouts.ColumnLayout { - anchors.fill: parent - QtControls.CheckBox { - id: showTitle - text: i18nc("@option:check", "Show title"); - onClicked: { - if (checked) { - title.forceActiveFocus(); - } - } - } - QtLayouts.RowLayout { - QtControls.Label { - enabled: showTitle.checked - text: i18nc("@label:textbox", "Title:") - } - QtControls.TextField { - id: title - QtLayouts.Layout.fillWidth: true - enabled: showTitle.checked + text: i18nc("@option:check", "Show title:"); + onClicked: { + if (checked) { + title.forceActiveFocus(); } } + } - QtControls.CheckBox { - id: showSeconds - text: i18nc("@option:check", "Show seconds"); - } + QQC2.TextField { + id: title + Layout.fillWidth: true + enabled: showTitle.checked } } - QtControls.GroupBox { - id: notificationGroup + QQC2.CheckBox { + id: showSeconds + text: i18nc("@option:check", "Show seconds"); + } - QtLayouts.Layout.fillWidth: true - flat: true - title: i18nc("@title:group", "Notifications") + Item { + Kirigami.FormData.isSection: true + } - QtLayouts.ColumnLayout { - anchors.fill: parent - QtControls.CheckBox { - id: showNotification - text: i18nc("@option:check", "Show notification"); - onClicked: { - if (checked) { - notificationText.forceActiveFocus(); - } - } - } - QtLayouts.RowLayout { - QtControls.Label { - enabled: showNotification.checked - text: i18nc("@label:textbox", "Text:") - } - QtControls.TextField { - id: notificationText - QtLayouts.Layout.fillWidth: true - enabled: showNotification.checked + RowLayout { + Layout.fillWidth: true + + Kirigami.FormData.label: i18nc("@title:label", "Notifications:") + + QQC2.CheckBox { + id: showNotification + text: i18nc("@option:check", "Show notification text:"); + onClicked: { + if (checked) { + notificationText.forceActiveFocus(); } } } - } - Item { // tighten layout - QtLayouts.Layout.fillHeight: true + QQC2.TextField { + id: notificationText + Layout.fillWidth: true + enabled: showNotification.checked + } } }