kcmkwin/kwindecoration: use Kirigami.ActionToolBar for the footer actions

This way, the footer actions collapse into a menu when there's not enough space
to show them all, instead of being cut off.

BUG: 460793
FIXED-IN: 5.26.2
This commit is contained in:
jrv ezg 2022-10-25 02:37:45 +00:00 committed by Nate Graham
parent 00b7f0394c
commit 7f7fa69135

View file

@ -9,7 +9,6 @@ import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 as QQC2 import QtQuick.Controls 2.15 as QQC2
import org.kde.kcm 1.6 as KCM import org.kde.kcm 1.6 as KCM
import org.kde.kconfig 1.0
import org.kde.kirigami 2.20 as Kirigami import org.kde.kirigami 2.20 as Kirigami
import org.kde.newstuff 1.85 as NewStuff import org.kde.newstuff 1.85 as NewStuff
@ -103,15 +102,12 @@ Kirigami.Page {
} }
} }
Item { Kirigami.ActionToolBar {
Layout.fillWidth: true flat: false
} alignment: Qt.AlignRight
actions: [
NewStuff.Button { NewStuff.Action {
id: newstuffButton
text: i18nc("button text", "Get New Window Decorations...") text: i18nc("button text", "Get New Window Decorations...")
icon.name: "get-hot-new-stuff"
visible: KAuthorized.authorize("ghns")
configFile: "window-decorations.knsrc" configFile: "window-decorations.knsrc"
onEntryEvent: (entry, event) => { onEntryEvent: (entry, event) => {
if (event === NewStuff.Engine.StatusChangedEvent) { if (event === NewStuff.Engine.StatusChangedEvent) {
@ -121,6 +117,8 @@ Kirigami.Page {
} }
} }
} }
]
}
} }
} }