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
This commit is contained in:
parent
3d8425e6ef
commit
d54fd38d3b
@ -347,7 +347,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
qreal left, top, right, bottom;
|
qreal left, top, right, bottom;
|
||||||
q->getContentsMargins(&left, &top, &right, &bottom);
|
q->getContentsMargins(&left, &top, &right, &bottom);
|
||||||
QSizeF oldSize(q->size());
|
QSizeF oldSize(q->size());
|
||||||
q->setMinimumSize(minimum + QSizeF(left+right, top+bottom));
|
|
||||||
//size not saved/invalid size saved
|
//size not saved/invalid size saved
|
||||||
if (oldSize.width() < q->minimumSize().width() || oldSize.height() < q->minimumSize().height()) {
|
if (oldSize.width() < q->minimumSize().width() || oldSize.height() < q->minimumSize().height()) {
|
||||||
q->resize(prefSize);
|
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
|
//emulate the same kind of behavior as Qt::Popup (close when you click somewhere
|
||||||
//else.
|
//else.
|
||||||
|
|
||||||
if (icon) {
|
|
||||||
q->setMinimumSize(QSize(0, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gWidget) {
|
if (gWidget) {
|
||||||
Corona *corona = qobject_cast<Corona *>(gWidget->scene());
|
Corona *corona = qobject_cast<Corona *>(gWidget->scene());
|
||||||
|
|
||||||
@ -416,10 +412,6 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
if (icon && lay) {
|
if (icon && lay) {
|
||||||
lay->addItem(icon);
|
lay->addItem(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon) {
|
|
||||||
q->setMinimumSize(0,0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user