From b041f44c125e48c04afabff977f59ea3fc90a2d8 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 3 Nov 2007 02:52:45 +0000 Subject: [PATCH] yeah, actually get the layout right. man layouts suck. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732195 --- applet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 56098d7d6..8ec281b62 100644 --- a/applet.cpp +++ b/applet.cpp @@ -501,6 +501,7 @@ void Applet::updateConstraints(Plasma::Constraints constraints) void Applet::constraintsUpdated(Plasma::Constraints constraints) { + Q_UNUSED(constraints) //kDebug() << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location(); } @@ -616,6 +617,7 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason) if (d->failed == failed) { if (d->failureText) { d->failureText->setHtml(visibleFailureText(reason)); + setGeometry(QRectF(geometry().topLeft(), d->failureText->sizeHint())); } return; } @@ -627,11 +629,13 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason) if (failed) { setDrawStandardBackground(true); - Layout* failureLayout = new BoxLayout(BoxLayout::TopToBottom,this); + Layout* failureLayout = new BoxLayout(BoxLayout::TopToBottom, this); + failureLayout->setMargin(0); d->failureText = new LineEdit(this, scene()); d->failureText->setFlags(0); d->failureText->setHtml(visibleFailureText(reason)); failureLayout->addItem(d->failureText); + setGeometry(QRectF(geometry().topLeft(), d->failureText->sizeHint())); } else { d->failureText = 0; }