don't jiggle

BUG:202949

svn path=/trunk/KDE/kdelibs/; revision=1129021
This commit is contained in:
Aaron J. Seigo 2010-05-21 02:03:19 +00:00
parent 67b79a816c
commit 2d1fe7b138

View File

@ -1211,8 +1211,10 @@ void IconWidget::setText(const QString &text)
QStyleOptionGraphicsItem styleoption; QStyleOptionGraphicsItem styleoption;
d->layoutIcons(&styleoption); d->layoutIcons(&styleoption);
} }
resize(sizeFromIconSize(d->iconSize.width()));
updateGeometry(); updateGeometry();
if (!parentWidget() || !parentWidget()->layout()) {
resize(preferredSize());
}
} }
QString IconWidget::text() const QString IconWidget::text() const
@ -1230,8 +1232,10 @@ void IconWidget::setInfoText(const QString &text)
QStyleOptionGraphicsItem styleoption; QStyleOptionGraphicsItem styleoption;
d->layoutIcons(&styleoption); d->layoutIcons(&styleoption);
} }
resize(sizeFromIconSize(d->iconSize.width()));
updateGeometry(); updateGeometry();
if (!parentWidget() || !parentWidget()->layout()) {
resize(preferredSize());
}
} }
QString IconWidget::infoText() const QString IconWidget::infoText() const