Verified Commit 327033a9 authored by Fushan Wen's avatar Fushan Wen
Browse files

containments/panel: make panel load slightly faster

By only loading ConfigOverlay on demand, the panel should be loaded
slightly faster now.

(cherry picked from commit 86f89208)
parent dcb87214
......@@ -18,7 +18,6 @@ MouseArea {
id: configurationArea
z: 1000
anchors.fill: parent
hoverEnabled: true
property Item currentApplet
......
......@@ -142,16 +142,18 @@ function checkLastSpacer() {
LayoutManager.save();
}
ConfigOverlay {
id: configOverlay
visible: plasmoid.userConfiguring
onVisibleChanged: {
if (visible) {
for (var i = 0; i < plasmoid.applets.length; ++i) {
plasmoid.applets[i].expanded = false;
}
}
Plasmoid.onUserConfiguringChanged: {
if (!Plasmoid.userConfiguring) {
root.configOverlay.destroy();
root.configOverlay = null;
return;
}
const component = Qt.createComponent("ConfigOverlay.qml");
root.configOverlay = component.createObject(root, {
"anchors.fill": root,
});
Plasmoid.applets.forEach(applet => applet.expanded = false);
}
//END connections
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment