diff --git a/containments/desktop/package/contents/ui/main.qml b/containments/desktop/package/contents/ui/main.qml --- a/containments/desktop/package/contents/ui/main.qml +++ b/containments/desktop/package/contents/ui/main.qml @@ -105,7 +105,7 @@ folderViewLayer.view.linkHere(desktopUrl); } - function addApplet(applet, x, y) { + function addApplet(applet, x, y, width, height) { var component = Qt.createComponent("AppletAppearance.qml"); var e = component.errorString(); if (e != "") { @@ -159,6 +159,11 @@ container.x = pos.x; container.y = pos.y; + //valid size passed by param? + if (width > 0 && height > 0) { + container.width = width; + container.height = height; + } // To be sure it's restored at the same position, take margins into account // if there is a background. if (applet.backgroundHints != PlasmaCore.Types.NoBackground) { @@ -285,7 +290,7 @@ ignoreUnknownSignals: true onAppletAdded: { - addApplet(applet, x, y); + addApplet(applet, x, y, width, height); // Clean any eventual invalid chunks in the config. LayoutManager.save(); }