diff --git a/applets/timer/package/contents/ui/configAdvanced.qml b/applets/timer/package/contents/ui/configAdvanced.qml index f5f9779e6..2746225a4 100644 --- a/applets/timer/package/contents/ui/configAdvanced.qml +++ b/applets/timer/package/contents/ui/configAdvanced.qml @@ -1,68 +1,53 @@ /* * Copyright 2015 Bernhard Friedrich * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ -import QtQuick 2.2 -import QtQuick.Controls 1.3 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: generalPage property alias cfg_runCommand: runCommand.checked property alias cfg_command: command.text - QtControls.GroupBox { - id: runCommandGroup - - QtLayouts.Layout.fillWidth: true - flat: true - - title: i18nc("@title:group", "Run Command") + RowLayout { + Layout.fillWidth: true - QtLayouts.ColumnLayout { - anchors.fill: parent + Kirigami.FormData.label: i18nc("@title:label", "After timer completes:") - QtControls.CheckBox { - id: runCommand - text: i18nc("@option:check", "Execute command") - onClicked: { - if (checked) { - command.forceActiveFocus(); - } - } - } - - QtLayouts.RowLayout { - QtControls.Label { - enabled: runCommand.checked - text: i18nc("@label:textbox", "Command:") - } - QtControls.TextField { - id: command - QtLayouts.Layout.fillWidth: true - enabled: runCommand.checked + QQC2.CheckBox { + id: runCommand + text: i18nc("@option:check", "Execute command:") + onClicked: { + if (checked) { + command.forceActiveFocus(); } } } - } - Item { // tighten layout - QtLayouts.Layout.fillHeight: true + QQC2.TextField { + id: command + Layout.fillWidth: true + enabled: runCommand.checked + } } } diff --git a/applets/timer/package/contents/ui/configAppearance.qml b/applets/timer/package/contents/ui/configAppearance.qml index 34a37f39f..c7f2eabd1 100644 --- a/applets/timer/package/contents/ui/configAppearance.qml +++ b/applets/timer/package/contents/ui/configAppearance.qml @@ -1,111 +1,93 @@ /* * Copyright 2015 Bernhard Friedreich * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * 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 property alias cfg_title: title.text property alias cfg_showSeconds: showSeconds.checked 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 + } } }