sensible size hints

svn path=/trunk/KDE/kdelibs/; revision=1019577
This commit is contained in:
Marco Martin 2009-09-03 22:24:29 +00:00
parent 1e6aaec27f
commit 7ef4b04838
2 changed files with 10 additions and 0 deletions

View File

@ -556,6 +556,15 @@ QString IconWidget::svg() const
return QString();
}
QSizeF IconWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
{
if (which == Qt::PreferredSize) {
return sizeFromIconSize(KIconLoader::SizeMedium);
} else {
return QGraphicsWidget::sizeHint(which, constraint);
}
}
void IconWidgetPrivate::hoverEffect(bool show)
{
if (show) {

View File

@ -263,6 +263,7 @@ public Q_SLOTS:
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
Q_SIGNALS:
/**