[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/kio
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-11-30 18:46:58
Message-ID: 1228070818.658873.21419.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 890971 by ppenz:

readd the font tag again, but use the tooltip text color instead of a hardcoded black color

CCMAIL: faure@kde.org

 M  +5 -3      kfileitem.cpp  


--- trunk/KDE/kdelibs/kio/kio/kfileitem.cpp #890970:890971
@@ -35,6 +35,7 @@
 #include <QtCore/QDir>
 #include <QtCore/QFile>
 #include <QtCore/QMap>
+#include <QtGui/QApplication>
 #include <QTextDocument>
 
 #include <kdebug.h>
@@ -982,9 +983,10 @@
 
     // the font tags are a workaround for the fact that the tool tip gets
     // screwed if the color scheme uses white as default text color
-    const char* start = "<tr><td align=\"right\"><nobr><b>";
-    const char* mid   = "&nbsp;</b></nobr></td><td><nobr>";
-    const char* end   = "</nobr></td></tr>";
+    const QString colorName = QApplication::palette().color(QPalette::ToolTipText).name(); 
+    const QString start = "<tr><td align=\"right\"><nobr><font color=\"" + colorName + "\"><b>";
+    const QString mid = "&nbsp;</b></font></nobr></td><td><nobr><font color=\"" + colorName + "\">";
+    const char* end = "</font></nobr></td></tr>";
 
     tip = "<table cellspacing=0 cellpadding=0>";
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic