when setting min/max sizes, adjust our geometry if our current size is not within those boundaries
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742716
This commit is contained in:
parent
eda0d2a4ef
commit
312f42dec0
@ -150,6 +150,10 @@ Qt::Orientations Widget::expandingDirections() const
|
||||
void Widget::setMinimumSize(const QSizeF& size)
|
||||
{
|
||||
d->minimumSize = size;
|
||||
if (d->size != d->size.expandedTo(size)) {
|
||||
d->size = d->size.expandedTo(size);
|
||||
updateGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
QSizeF Widget::minimumSize() const
|
||||
@ -160,6 +164,10 @@ QSizeF Widget::minimumSize() const
|
||||
void Widget::setMaximumSize(const QSizeF& size)
|
||||
{
|
||||
d->maximumSize = size;
|
||||
if (d->size != d->size.boundedTo(size)) {
|
||||
d->size = d->size.boundedTo(size);
|
||||
updateGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
QSizeF Widget::maximumSize() const
|
||||
|
Loading…
Reference in New Issue
Block a user