diff --git a/applets/quicklaunch/package/contents/ui/ConfigGeneral.qml b/applets/quicklaunch/package/contents/ui/ConfigGeneral.qml --- a/applets/quicklaunch/package/contents/ui/ConfigGeneral.qml +++ b/applets/quicklaunch/package/contents/ui/ConfigGeneral.qml @@ -18,90 +18,93 @@ * along with this program. If not, see */ -import QtQuick 2.0 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 +import QtQuick 2.5 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.5 as QQC2 + +import org.kde.kirigami 2.8 as Kirigami import org.kde.plasma.core 2.0 as PlasmaCore -ColumnLayout { +Kirigami.FormLayout { + + anchors.right: parent.right + anchors.left: parent.left readonly property bool vertical: plasmoid.formFactor == PlasmaCore.Types.Vertical || (plasmoid.formFactor == PlasmaCore.Types.Planar && plasmoid.height > plasmoid.width) property alias cfg_maxSectionCount: maxSectionCount.value property alias cfg_showLauncherNames: showLauncherNames.checked property alias cfg_enablePopup: enablePopup.checked property alias cfg_title: title.text - GroupBox { - Layout.fillWidth: true - flat: true - title: i18nc("@title:group", "Arrangement") + QQC2.SpinBox { + id: maxSectionCount - RowLayout { - Label { - text: vertical ? i18nc("@label:spinbox", "Maximum columns:") : i18nc("@label:spinbox", "Maximum rows:") - } + Kirigami.FormData.label: vertical ? i18nc("@label:spinbox", "Maximum columns:") : i18nc("@label:spinbox", "Maximum rows:") - SpinBox { - id: maxSectionCount - minimumValue: 1 - } - } + from: 1 } - GroupBox { - Layout.fillWidth: true - flat: true - title: i18nc("@title:group", "Appearance") + Item { + Kirigami.FormData.isSection: true + } - ColumnLayout { - CheckBox { - id: showLauncherNames - text: i18nc("@option:check", "Show launcher names") - } - CheckBox { - id: enablePopup - text: i18nc("@option:check", "Enable popup") - } - } + QQC2.CheckBox { + id: showLauncherNames + + Kirigami.FormData.label: i18nc("@title:group", "Appearance:") + + text: i18nc("@option:check", "Show launcher names") } - GroupBox { + QQC2.CheckBox { + id: enablePopup + text: i18nc("@option:check", "Enable popup") + } + + + Item { + Kirigami.FormData.isSection: true + } + + + RowLayout { + Kirigami.FormData.label: i18nc("@title:group", "Title:") Layout.fillWidth: true - flat: true - title: i18nc("@title:group", "Title") visible: plasmoid.formFactor == PlasmaCore.Types.Planar - RowLayout { - anchors.fill: parent - CheckBox { - id: showTitle - checked: title.activeFocus || title.length - text: i18nc("@option:check", "Show title") - - onClicked: { - if (checked) { - title.forceActiveFocus(); - } else { - title.text = ""; - } - } - } + QQC2.CheckBox { + id: showTitle + checked: title.length + text: i18nc("@option:check", "Show:") - TextField { - id: title - Layout.fillWidth: true - enabled: showTitle.checked - placeholderText: i18nc("@info:placeholder", "Enter title") + onClicked: { + if (checked) { + title.forceActiveFocus(); + } else { + title.text = ""; + } } } - } - Item { // tighten layout - Layout.fillHeight: true + Kirigami.ActionTextField { + id: title + enabled: showTitle.checked + + Layout.fillWidth: true + placeholderText: i18nc("@info:placeholder", "Custom title") + + rightActions: [ + Kirigami.Action { + iconName: "edit-clear" + visible: title.text.length !== 0 + onTriggered: title.text = ""; + } + ] + } } }