syncronize the minimum size with the one of graphicsWidget() or widget()

upon containment change

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875720
This commit is contained in:
Marco Martin 2008-10-25 11:28:06 +00:00
parent df65542e6a
commit caef45dcf9

View File

@ -202,6 +202,10 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
lay->addItem(proxy); lay->addItem(proxy);
} }
} }
qreal left, top, right, bottom;
q->getContentsMargins(&left, &top, &right, &bottom);
q->setMinimumSize(minimum + QSizeF(left+right, top+bottom));
} else { } else {
//save the aspect ratio mode in case we drag'n drop in the Desktop later //save the aspect ratio mode in case we drag'n drop in the Desktop later
savedAspectRatio = q->aspectRatioMode(); savedAspectRatio = q->aspectRatioMode();
@ -265,6 +269,8 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
if (icon && lay) { if (icon && lay) {
lay->addItem(icon); lay->addItem(icon);
} }
q->setMinimumSize(0,0);
} }
} }
} }