]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use the inactive text color for all columns except the name column. This indicates...
authorPeter Penz <peter.penz19@gmail.com>
Sat, 20 Nov 2010 11:29:54 +0000 (11:29 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 20 Nov 2010 11:29:54 +0000 (11:29 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1199020

src/views/dolphinfileitemdelegate.cpp

index 3e537ffeb7afffeeb75ad02e73b423995d0c2d55..0372ce674b8354a7b3a3d1148121fa69fd330bd9 100644 (file)
@@ -20,6 +20,7 @@
 #include "dolphinfileitemdelegate.h"
 
 #include "dolphinmodel.h"
+#include <kcolorscheme.h>
 #include <kfileitem.h>
 #include <kicon.h>
 #include <kiconloader.h>
@@ -58,6 +59,15 @@ void DolphinFileItemDelegate::paint(QPainter* painter,
         adjustOptionWidth(opt, proxyModel, dolphinModel, index);
     }
 
+    if (!isNameColumn) {
+        // Use the inactive text color for all columns except the name column. This indicates for the user that
+        // hovering other columns does not change the actions context.
+        QPalette palette = opt.palette;
+        const QColor textColor = KColorScheme(QPalette::Active).foreground(KColorScheme::InactiveText).color();
+        palette.setColor(QPalette::Text, textColor);
+        opt.palette = palette;
+    }
+
     if (dolphinModel->hasVersionData() && isNameColumn) {
         // The currently shown items are under revision control. Show the current revision
         // state by adding an emblem and changing the text tintColor.