desktoptoolbox: Add panel button

Adds a menu item for adding panels, to complement the one for adding widgets.

Requires https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3774.
This commit is contained in:
Akseli Lahtinen 2024-01-18 17:54:22 +00:00 committed by Nate Graham
parent e3c827538f
commit 0aa96e6eb7

View file

@ -239,6 +239,7 @@ MouseArea {
// Show buttons in two lines if screen space is limited
readonly property real buttonWidth: addWidgetButton.implicitWidth
+ addPanelButton.implicitWidth
+ configureButton.implicitWidth
+ themeButton.implicitWidth
+ displaySettingsButton.implicitWidth
@ -255,6 +256,16 @@ MouseArea {
onClicked: qAction.trigger()
}
PlasmaComponents3.ToolButton {
id: addPanelButton
height: addWidgetButton.height
property QtObject qAction: Plasmoid.corona.action("add panel")
text: qAction.text
icon.name: "list-add"
Accessible.role: Accessible.ButtonMenu
onClicked: Plasmoid.corona.showAddPanelContextMenu(mapToGlobal(0, height))
}
PlasmaComponents3.ToolButton {
id: configureButton
property QtObject qAction: Plasmoid.internalAction("configure")