-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) {
|
if (which == Qt::PreferredSize) {
|
||||||
return sizeFromIconSize(KIconLoader::SizeMedium);
|
return sizeFromIconSize(KIconLoader::SizeMedium);
|
||||||
|
} else if (which == Qt::MinimumSize) {
|
||||||
|
return sizeFromIconSize(KIconLoader::SizeSmall);
|
||||||
} else {
|
} else {
|
||||||
return QGraphicsWidget::sizeHint(which, constraint);
|
return QGraphicsWidget::sizeHint(which, constraint);
|
||||||
}
|
}
|
||||||
@ -1119,6 +1121,7 @@ void IconWidget::setText(const QString &text)
|
|||||||
d->layoutIcons(&styleoption);
|
d->layoutIcons(&styleoption);
|
||||||
}
|
}
|
||||||
resize(sizeFromIconSize(d->iconSize.width()));
|
resize(sizeFromIconSize(d->iconSize.width()));
|
||||||
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString IconWidget::text() const
|
QString IconWidget::text() const
|
||||||
@ -1136,6 +1139,7 @@ void IconWidget::setInfoText(const QString &text)
|
|||||||
d->layoutIcons(new QStyleOptionGraphicsItem);
|
d->layoutIcons(new QStyleOptionGraphicsItem);
|
||||||
}
|
}
|
||||||
resize(sizeFromIconSize(d->iconSize.width()));
|
resize(sizeFromIconSize(d->iconSize.width()));
|
||||||
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString IconWidget::infoText() const
|
QString IconWidget::infoText() const
|
||||||
|
Loading…
Reference in New Issue
Block a user