From 7f7fa69135773cd7d9217464e94b36c2fdca06d1 Mon Sep 17 00:00:00 2001 From: jrv ezg Date: Tue, 25 Oct 2022 02:37:45 +0000 Subject: [PATCH] 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 --- .../package/contents/ui/main.qml | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/kcmkwin/kwindecoration/package/contents/ui/main.qml b/src/kcmkwin/kwindecoration/package/contents/ui/main.qml index 538d937c64..9c53d0cd8e 100644 --- a/src/kcmkwin/kwindecoration/package/contents/ui/main.qml +++ b/src/kcmkwin/kwindecoration/package/contents/ui/main.qml @@ -9,7 +9,6 @@ import QtQuick.Layouts 1.15 import QtQuick.Controls 2.15 as QQC2 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.newstuff 1.85 as NewStuff @@ -103,23 +102,22 @@ Kirigami.Page { } } - Item { - Layout.fillWidth: true - } - - NewStuff.Button { - id: newstuffButton - text: i18nc("button text", "Get New Window Decorations...") - icon.name: "get-hot-new-stuff" - visible: KAuthorized.authorize("ghns") - configFile: "window-decorations.knsrc" - onEntryEvent: (entry, event) => { - if (event === NewStuff.Engine.StatusChangedEvent) { - kcm.reloadKWinSettings(); - } else if (event === NewStuff.Engine.EntryAdoptedEvent) { - kcm.load(); + Kirigami.ActionToolBar { + flat: false + alignment: Qt.AlignRight + actions: [ + NewStuff.Action { + text: i18nc("button text", "Get New Window Decorations...") + configFile: "window-decorations.knsrc" + onEntryEvent: (entry, event) => { + if (event === NewStuff.Engine.StatusChangedEvent) { + kcm.reloadKWinSettings(); + } else if (event === NewStuff.Engine.EntryAdoptedEvent) { + kcm.load(); + } + } } - } + ] } } }