From d54fd38d3bffa1f083216a7453f90fbdae59572c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 21 Apr 2010 17:47:38 +0000 Subject: [PATCH] hardcoded setMinimumSize is evil, evil, evil now the actual sizehints are used, since qgraphicslayouts got slightly better we have more up to date hints svn path=/trunk/KDE/kdelibs/; revision=1117260 --- popupapplet.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index e16d0c517..00a7871b0 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -347,7 +347,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) qreal left, top, right, bottom; q->getContentsMargins(&left, &top, &right, &bottom); QSizeF oldSize(q->size()); - q->setMinimumSize(minimum + QSizeF(left+right, top+bottom)); + //size not saved/invalid size saved if (oldSize.width() < q->minimumSize().width() || oldSize.height() < q->minimumSize().height()) { q->resize(prefSize); @@ -380,10 +380,6 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) //emulate the same kind of behavior as Qt::Popup (close when you click somewhere //else. - if (icon) { - q->setMinimumSize(QSize(0, 0)); - } - if (gWidget) { Corona *corona = qobject_cast(gWidget->scene()); @@ -416,10 +412,6 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) if (icon && lay) { lay->addItem(icon); } - - if (icon) { - q->setMinimumSize(0,0); - } } }