Do not use space for text if there is none set

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=736901
This commit is contained in:
Andre Duffeck 2007-11-15 06:59:25 +00:00
parent 44297aaddb
commit 3b6b25445d

View File

@ -366,6 +366,9 @@ void Icon::actionDestroyed(QObject* action)
QSizeF Icon::Private::displaySizeHint(const QStyleOptionGraphicsItem *option) const
{
if (text.isEmpty() && infoText.isEmpty()) {
return QSizeF( .0, .0 );
}
QString label = text;
// const qreal maxWidth = (orientation == Qt::Vertical) ? iconSize.width() + 10 : 32757;
// NOTE: find a way to use the other layoutText, it currently returns nominal width, when