diff --git a/applet.cpp b/applet.cpp index bc1e61f03..cbd260f8e 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1946,6 +1946,15 @@ void AppletPrivate::setupScriptSupport() if (!package->filePath("mainconfigui").isEmpty()) { q->setHasConfigurationInterface(true); } + + //set a default size before any saved settings are read + QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize(); + if (size == QSize()) { + size = QSize(200,200); + } + //kDebug() << "size" << size; + q->resize(size); + } QString AppletPrivate::globalName() const diff --git a/servicetypes/plasma-applet.desktop b/servicetypes/plasma-applet.desktop index a056e93ef..0b02b0f38 100644 --- a/servicetypes/plasma-applet.desktop +++ b/servicetypes/plasma-applet.desktop @@ -59,3 +59,6 @@ Type=QString [PropertyDef::X-Plasma-DropMimeTypes] Type=QStringList +[PropertyDef::X-Plasma-DefaultSize] +Type=QSize +