From a6d78366825f9329db2d0d9971c7ec4d3f399ccc Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 22 Jan 2022 01:23:28 +0100 Subject: [PATCH] Move footer button to header --- src/kcm/package/contents/ui/main.qml | 54 +++++++++++++--------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/kcm/package/contents/ui/main.qml b/src/kcm/package/contents/ui/main.qml index bb8169d0..94902ea8 100644 --- a/src/kcm/package/contents/ui/main.qml +++ b/src/kcm/package/contents/ui/main.qml @@ -16,9 +16,30 @@ import org.kde.bluezqt 1.0 as BluezQt import org.kde.plasma.private.bluetooth 1.0 ScrollViewKCM { - id: root + actions.main: Kirigami.Action { + text: i18n("Add New Device…") + icon.name: "list-add" + onTriggered: kcm.runWizard() + visible: BluezQt.Manager.bluetoothOperational + } + + actions.contextualActions: [ + Kirigami.Action { + text: i18n("Disable Bluetooth") + icon.name: "network-bluetooth" + onTriggered: root.setBluetoothEnabled(false) + visible: BluezQt.Manager.bluetoothOperational + }, + Kirigami.Action { + text: i18n("Configure…") + icon.name: "configure" + onTriggered: kcm.push("General.qml") + visible: BluezQt.Manager.bluetoothOperational + } + ] + function makeCall(call) { busyIndicator.running = true call.finished.connect(call => { @@ -86,6 +107,9 @@ ScrollViewKCM { showCloseButton: true } + footer: null + framedView: false + view: ListView { id: list clip: true @@ -179,32 +203,4 @@ ScrollViewKCM { ] } } - - footer: RowLayout { - visible: BluezQt.Manager.bluetoothOperational - - QQC2.Button { - text: i18n("Add New Device…") - icon.name: "list-add" - onClicked: kcm.runWizard() - } - - QQC2.Button { - text: i18n("Disable Bluetooth") - icon.name: "network-bluetooth" - onClicked: { - root.setBluetoothEnabled(false) - } - } - - Item { - Layout.fillWidth: true - } - - QQC2.Button { - text: i18n("Configure…") - icon.name: "configure" - onClicked: kcm.push("General.qml") - } - } } -- GitLab