From: Peter Penz Date: Sat, 20 Nov 2010 11:29:54 +0000 (+0000) Subject: Use the inactive text color for all columns except the name column. This indicates... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/111558558437cbe14624b6916371ca7f82467bba?ds=inline 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. svn path=/trunk/KDE/kdebase/apps/; revision=1199020 --- diff --git a/src/views/dolphinfileitemdelegate.cpp b/src/views/dolphinfileitemdelegate.cpp index 3e537ffeb..0372ce674 100644 --- a/src/views/dolphinfileitemdelegate.cpp +++ b/src/views/dolphinfileitemdelegate.cpp @@ -20,6 +20,7 @@ #include "dolphinfileitemdelegate.h" #include "dolphinmodel.h" +#include #include #include #include @@ -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.