diff options
| author | Peter Penz <[email protected]> | 2010-11-20 11:29:54 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-11-20 11:29:54 +0000 |
| commit | 111558558437cbe14624b6916371ca7f82467bba (patch) | |
| tree | dd05ba28efc4ef21d63d5fbfce4388e90ed21624 /src/views/dolphinfileitemdelegate.cpp | |
| parent | 673f10ac88fe001e9f854c95f273c9fab1438867 (diff) | |
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
Diffstat (limited to 'src/views/dolphinfileitemdelegate.cpp')
| -rw-r--r-- | src/views/dolphinfileitemdelegate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 <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. |
