From 2a02ac7d02790c69a63ee79e2fac4e94b9165531 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 21 Nov 2009 22:50:22 +0000 Subject: Let KMetaDataWidget and all the child widgets respect the foreground role that might be set by the client. This allows KMetaDataWidget to get embedded inside a tooltip having correct tooltip colors. svn path=/trunk/KDE/kdebase/apps/; revision=1052509 --- src/panels/information/kcommentwidget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/panels/information/kcommentwidget.cpp') diff --git a/src/panels/information/kcommentwidget.cpp b/src/panels/information/kcommentwidget.cpp index c1f7ab757..408e6a873 100644 --- a/src/panels/information/kcommentwidget.cpp +++ b/src/panels/information/kcommentwidget.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -87,6 +88,14 @@ bool KCommentWidget::isReadOnly() const return m_readOnly; } +bool KCommentWidget::event(QEvent* event) +{ + if (event->type() == QEvent::Polish) { + m_label->setForegroundRole(foregroundRole()); + } + return QWidget::event(event); +} + void KCommentWidget::slotLinkActivated(const QString& link) { KDialog dialog(this, Qt::Dialog); -- cgit v1.3