avoid negative sizes in absurd situations

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746404
This commit is contained in:
Aaron J. Seigo 2007-12-08 21:40:59 +00:00
parent 2a34006fcd
commit 706585b270

View File

@ -935,7 +935,7 @@ QSizeF Applet::contentSize() const
// kDebug() << "Geometry size: " << geometry().size();
// kDebug() << "Borders: " << left << top << right << bottom;
return geometry().size() - QSizeF(left + right, top + bottom);
return (geometry().size() - QSizeF(left + right, top + bottom)).expandedTo(QSizeF(0, 0));
}
void Applet::setContentSize(const QSizeF &size)