Respect min/max sizeHints when setting geometry
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701205
This commit is contained in:
parent
93070ce1fd
commit
19efbb9108
@ -158,11 +158,13 @@ QRectF Widget::localGeometry() const
|
|||||||
|
|
||||||
void Widget::setGeometry(const QRectF& geometry)
|
void Widget::setGeometry(const QRectF& geometry)
|
||||||
{
|
{
|
||||||
bool sizeChange = d->size != geometry.size();
|
if ( d->size != geometry.size() ) {
|
||||||
|
|
||||||
if ( sizeChange ) {
|
|
||||||
prepareGeometryChange();
|
prepareGeometryChange();
|
||||||
d->size = geometry.size();
|
qreal width = qBound(d->minimumSize.width(), geometry.size().width(), d->maximumSize.width());
|
||||||
|
qreal height = qBound(d->minimumSize.height(), geometry.size().height(), d->maximumSize.height());
|
||||||
|
|
||||||
|
d->size = QSizeF(width, height);
|
||||||
|
|
||||||
}
|
}
|
||||||
setPos(geometry.topLeft());
|
setPos(geometry.topLeft());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user