kcms/scripts: Move footer actions to the page header

…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.
remotes/origin/work/zzag/backend-drm-remove-flags-in-gbm-buffer
ivan tkachenko 3 years ago committed by Vlad Zahorodnii
parent ae11658e0c
commit 417a7f3601
  1. 40
      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()
}
}
}
]
}
}

Loading…
Cancel
Save