From 2fa6d4204c7edbe0a723cbc9aef010ccf5d9f2b1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 26 Apr 2010 14:50:54 +0000 Subject: [PATCH] - when the background gets enabled, recalculate hints - always add item margins to the hint svn path=/trunk/KDE/kdelibs/; revision=1119097 --- widgets/iconwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 8c22144fa..d1eeaa00d 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -512,6 +512,7 @@ void IconWidget::setDrawBackground(bool draw) } update(); + updateGeometry(); } } @@ -1498,7 +1499,7 @@ QSizeF IconWidget::sizeFromIconSize(const qreal iconWidth) const d->setActiveMargins(); if (d->text.isEmpty() && d->infoText.isEmpty()) { //no text, just the icon size - return QSizeF(iconWidth, iconWidth); + return d->addMargin(QSizeF(iconWidth, iconWidth), IconWidgetPrivate::ItemMargin); } QFontMetricsF fm(d->widgetFont());