Triggering "configure" action sets applet's expanded = false
Whenever a "configure" action is triggered, plasmoid's expanded
property is set to false
unconditionally, even if it was in full representation without needing a popup. It has side-effects, such as «Battery & Brightness» applet losing from the batteries model because of a binding that looks like this:
model: Plasmoid.expanded ? batteries : null
The code of the CompactApplet.qml
is basically a ripoff of an identically named file in the plasma-desktop/desktoppackage. Except some things being removed, and than there's a special code handling the configure action — and guess what? — that one is slightly different.
desktop package:
Connections {
target: plasmoid.action("configure")
function onTriggered() {
if (plasmoid.hideOnWindowDeactivate) {
plasmoid.expanded = false
}
}
}
sdk:
Connections {
target: plasmoid.action("configure")
function onTriggered() { plasmoid.expanded = false }
}
So, the SDK code lacks a check for hideOnWindowDeactivate
, and it seemed like an easy fix. However, even after copying the code with a check from desktop package, the SDK issue didn't go away.
I am confused about it. I don't yet fully understand what's happening and why. But here's the issue.