resize the extender applet to a sane size when created

svn path=/trunk/KDE/kdelibs/; revision=899905
This commit is contained in:
Marco Martin 2008-12-21 20:28:17 +00:00
parent acc4171b16
commit 3ada99112f

View File

@ -756,6 +756,11 @@ void ExtenderItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (applet) {
setExtender(applet->d->extender);
QSizeF margin = applet->size() - applet->contentsRect().size();
applet->setMinimumSize(minimumSize() + margin);
applet->setPreferredSize(preferredSize() + margin);
applet->resize(preferredSize());
extenderCreated = true;
} else {
kDebug() << "Creating internal:extender applet failed, probably "