From 417a7f36015ffc166adc1893c896e4c42055d6a9 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Wed, 31 May 2023 17:02:35 +0300 Subject: [PATCH] kcms/scripts: Move footer actions to the page header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …to avoid the "two stacked rows of buttons" effect. Changes "Get New" button text to avoid redundancy because title already contains the "Script" word in it. --- src/kcms/scripts/package/contents/ui/main.qml | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/src/kcms/scripts/package/contents/ui/main.qml b/src/kcms/scripts/package/contents/ui/main.qml index 8ed8a07e4e..a32617b12d 100644 --- a/src/kcms/scripts/package/contents/ui/main.qml +++ b/src/kcms/scripts/package/contents/ui/main.qml @@ -19,6 +19,24 @@ ScrollViewKCM { implicitWidth: Kirigami.Units.gridUnit * 22 implicitHeight: Kirigami.Units.gridUnit * 20 + actions: [ + Kirigami.Action { + icon.name: "document-import" + text: i18n("Install from File…") + onTriggered: kcm.importScript() + }, + NewStuff.Action { + text: i18nc("@action:button get new KWin scripts", "Get New…") + visible: KAuthorized.authorize(KAuthorized.GHNS) + configFile: "kwinscripts.knsrc" + onEntryEvent: (entry, event) => { + if (event === NewStuff.Engine.StatusChangedEvent) { + kcm.onGHNSEntriesChanged() + } + } + } + ] + header: ColumnLayout { spacing: Kirigami.Units.smallSpacing @@ -52,26 +70,4 @@ ScrollViewKCM { ] } } - - footer: Kirigami.ActionToolBar { - flat: false - alignment: Qt.AlignRight - actions: [ - Kirigami.Action { - icon.name: "document-import" - text: i18n("Install from File…") - onTriggered: kcm.importScript() - }, - NewStuff.Action { - text: i18n("Get New Scripts…") - visible: KAuthorized.authorize(KAuthorized.GHNS) - configFile: "kwinscripts.knsrc" - onEntryEvent: (entry, event) => { - if (event === NewStuff.Engine.StatusChangedEvent) { - kcm.onGHNSEntriesChanged() - } - } - } - ] - } }