From e4c88d3ac22ade661ecbe46dfa4ad0d6358a63aa Mon Sep 17 00:00:00 2001 From: Luis Bocanegra Date: Sun, 3 Nov 2024 17:43:52 -0600 Subject: [PATCH] feat: open widget configuration from right click menu on any widget --- package/contents/ui/main.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index b65afbe..f91ea0f 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -1298,6 +1298,13 @@ PlasmoidItem { } } + PlasmaCore.Action { + id: configureAction + text: plasmoid.internalAction("configure").text + icon.name: 'configure' + onTriggered: plasmoid.internalAction("configure").trigger() + } + function showWidgets(panelLayout) { console.error("showWidgets()") for (var i in panelLayout.children) { @@ -1307,7 +1314,9 @@ PlasmoidItem { if (!child.applet?.plasmoid?.pluginName) continue // if (Utils.getBgManaged(child)) continue // console.error(child.applet?.plasmoid?.pluginName) - // Utils.dumpProps(child) + if (child.applet.plasmoid.pluginName !== "luisbocanegra.panel.colorizer") { + child.applet.plasmoid.contextualActions.push(configureAction) + } const isTray = child.applet.plasmoid.pluginName === "org.kde.plasma.systemtray" if (isTray) trayIndex = i const bgItem = Utils.getBgManaged(child)