From 5bda02b4c3a7c8895caee1d378322272dd795e7b Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 29 Jul 2008 00:28:59 +0000 Subject: [PATCH] Make the icon adjust its size when the text changes. CCMAIL: panel-devel@kde.org Please backport. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838892 --- widgets/icon.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/widgets/icon.cpp b/widgets/icon.cpp index 54401b1c6..dd69f0ba4 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -974,7 +974,10 @@ void Icon::setText(const QString& text) { d->text = text; // cause a relayout + // FIXME: is invalidating d->currentSize really necessary? + // FIXME: is d->currentSize really necessary at all? d->currentSize = QSizeF(-1, -1); + resize(sizeFromIconSize(d->iconSize.width())); } QString Icon::text() const @@ -986,7 +989,10 @@ void Icon::setInfoText(const QString& text) { d->infoText = text; // cause a relayout + // FIXME: is invalidating d->currentSize really necessary? + // FIXME: is d->currentSize really necessary at all? d->currentSize = QSizeF(-1, -1); + resize(sizeFromIconSize(d->iconSize.width())); } QString Icon::infoText() const