set the text color for the label.

another bug in QGraphicsProxyWidget? labels appear as innactive until you click on them!

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=808983
This commit is contained in:
Aaron J. Seigo 2008-05-18 01:26:29 +00:00
parent aadef48088
commit f561b7f861

View File

@ -204,7 +204,11 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason)
failureLayout->setContentsMargins(0, 0, 0, 0); failureLayout->setContentsMargins(0, 0, 0, 0);
QGraphicsProxyWidget * failureWidget = new QGraphicsProxyWidget(this); QGraphicsProxyWidget * failureWidget = new QGraphicsProxyWidget(this);
QLabel * label = new QLabel(d->visibleFailureText(reason)); QLabel * label = new QLabel(d->visibleFailureText(reason));
//FIXME : Get the theme color font QPalette p = label->palette();
QColor color = Theme::defaultTheme()->color(Theme::TextColor);
p.setColor(QPalette::Normal, QPalette::WindowText, color);
p.setColor(QPalette::Inactive, QPalette::WindowText, color);
label->setPalette(p);
label->setAttribute(Qt::WA_NoSystemBackground); label->setAttribute(Qt::WA_NoSystemBackground);
label->setAutoFillBackground(false); label->setAutoFillBackground(false);
label->setWordWrap(true); label->setWordWrap(true);