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)
|
void Widget::setMinimumSize(const QSizeF& size)
|
||||||
{
|
{
|
||||||
d->minimumSize = size;
|
d->minimumSize = size;
|
||||||
|
if (d->size != d->size.expandedTo(size)) {
|
||||||
|
d->size = d->size.expandedTo(size);
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF Widget::minimumSize() const
|
QSizeF Widget::minimumSize() const
|
||||||
@ -160,6 +164,10 @@ QSizeF Widget::minimumSize() const
|
|||||||
void Widget::setMaximumSize(const QSizeF& size)
|
void Widget::setMaximumSize(const QSizeF& size)
|
||||||
{
|
{
|
||||||
d->maximumSize = size;
|
d->maximumSize = size;
|
||||||
|
if (d->size != d->size.boundedTo(size)) {
|
||||||
|
d->size = d->size.boundedTo(size);
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF Widget::maximumSize() const
|
QSizeF Widget::maximumSize() const
|
||||||
|
Loading…
Reference in New Issue
Block a user