kcms/effects: 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 "Desktop Effects" string in it.
This commit is contained in:
ivan tkachenko 2023-06-03 17:30:19 +03:00
parent 3194d74851
commit 7db140d03b
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -20,6 +20,17 @@ ScrollViewKCM {
implicitHeight: Kirigami.Units.gridUnit * 30
implicitWidth: Kirigami.Units.gridUnit * 40
actions: NewStuff.Action {
text: i18n("Get New…")
visible: KAuthorized.authorize(KAuthorized.GHNS)
configFile: "kwineffect.knsrc"
onEntryEvent: (entry, event) => {
if (event === NewStuff.Engine.StatusChangedEvent) {
kcm.onGHNSEntriesChanged()
}
}
}
header: ColumnLayout {
spacing: Kirigami.Units.smallSpacing
@ -119,21 +130,4 @@ ScrollViewKCM {
return group;
}
}
footer: ColumnLayout {
RowLayout {
Layout.alignment: Qt.AlignRight
NewStuff.Button {
text: i18n("Get New Desktop Effects…")
visible: KAuthorized.authorize(KAuthorized.GHNS)
configFile: "kwineffect.knsrc"
onEntryEvent: (entry, event) => {
if (event === NewStuff.Engine.StatusChangedEvent) {
kcm.onGHNSEntriesChanged()
}
}
}
}
}
}