-minimum size hint
-when the text changes discard the cached hints svn path=/trunk/KDE/kdelibs/; revision=1066299
This commit is contained in:
parent
2ee4189268
commit
96d2513e9e
@ -594,6 +594,8 @@ QSizeF IconWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
{
|
||||
if (which == Qt::PreferredSize) {
|
||||
return sizeFromIconSize(KIconLoader::SizeMedium);
|
||||
} else if (which == Qt::MinimumSize) {
|
||||
return sizeFromIconSize(KIconLoader::SizeSmall);
|
||||
} else {
|
||||
return QGraphicsWidget::sizeHint(which, constraint);
|
||||
}
|
||||
@ -1119,6 +1121,7 @@ void IconWidget::setText(const QString &text)
|
||||
d->layoutIcons(&styleoption);
|
||||
}
|
||||
resize(sizeFromIconSize(d->iconSize.width()));
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
QString IconWidget::text() const
|
||||
@ -1136,6 +1139,7 @@ void IconWidget::setInfoText(const QString &text)
|
||||
d->layoutIcons(new QStyleOptionGraphicsItem);
|
||||
}
|
||||
resize(sizeFromIconSize(d->iconSize.width()));
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
QString IconWidget::infoText() const
|
||||
|
Loading…
Reference in New Issue
Block a user