yes, that makes a bit more sense ;)

svn path=/trunk/KDE/kdelibs/; revision=1130605
This commit is contained in:
Aaron J. Seigo 2010-05-25 19:43:14 +00:00
parent 376b6cbb88
commit 30b2a10d57

View File

@ -672,7 +672,7 @@ QSizeF IconWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
{ {
if (which == Qt::PreferredSize) { if (which == Qt::PreferredSize) {
if (d->preferredIconSize.isValid()) { if (d->preferredIconSize.isValid()) {
return sizeFromIconSize(qMax(d->preferredIconSize.height(), d->preferredIconSize.height())); return sizeFromIconSize(qMax(d->preferredIconSize.height(), d->preferredIconSize.width()));
} }
int iconSize = KIconLoader::SizeMedium; int iconSize = KIconLoader::SizeMedium;
if (d->iconSvg) { if (d->iconSvg) {
@ -688,12 +688,12 @@ QSizeF IconWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
return sizeFromIconSize(iconSize); return sizeFromIconSize(iconSize);
} else if (which == Qt::MinimumSize) { } else if (which == Qt::MinimumSize) {
if (d->minimumIconSize.isValid()) { if (d->minimumIconSize.isValid()) {
return sizeFromIconSize(qMax(d->minimumIconSize.height(), d->minimumIconSize.height())); return sizeFromIconSize(qMax(d->minimumIconSize.height(), d->minimumIconSize.width()));
} }
return sizeFromIconSize(KIconLoader::SizeSmall); return sizeFromIconSize(KIconLoader::SizeSmall);
} else { } else {
if (d->maximumIconSize.isValid()) { if (d->maximumIconSize.isValid()) {
return sizeFromIconSize(qMax(d->maximumIconSize.height(), d->maximumIconSize.height())); return sizeFromIconSize(qMax(d->maximumIconSize.height(), d->maximumIconSize.width()));
} }
return QGraphicsWidget::sizeHint(which, constraint); return QGraphicsWidget::sizeHint(which, constraint);
} }