]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinfileitemdelegate.h
Fix Dolphin session management regression
[dolphin.git] / src / views / dolphinfileitemdelegate.h
index def83a883c422f584abdb191679d00754d705f00..ab4a9fd20b6f5b6bec7247ee48dc0171e3ec51f4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2008 by Peter Penz <peter.penz@gmx.at>                  *
+ *   Copyright (C) 2008 by Peter Penz <peter.penz19@gmail.com>             *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -20,7 +20,7 @@
 #ifndef DOLPHINFILEITEMDELEGATE_H
 #define DOLPHINFILEITEMDELEGATE_H
 
-#include <kfileitemdelegate.h>
+#include <KFileItemDelegate>
 #include <views/dolphinmodel.h>
 
 class QAbstractProxyModel;
@@ -33,10 +33,11 @@ class QAbstractProxyModel;
  * Note that this is a workaround, as Qt does not support having custom
  * shapes within the visual rect of an item view. The visual part of
  * workaround is handled inside DolphinFileItemDelegate, the behavior
- * changes are handled in DolphinDetailsView.
+ * changes are handled in DolphinTreeView.
  */
 class DolphinFileItemDelegate : public KFileItemDelegate
 {
+    Q_OBJECT
 public:
     explicit DolphinFileItemDelegate(QObject* parent = 0);
     virtual ~DolphinFileItemDelegate();
@@ -60,6 +61,9 @@ public:
      */
     static int nameColumnWidth(const QString& name, const QStyleOptionViewItem& option);
 
+private slots:
+    void handleDisplayPaletteChange();
+
 private:
     static void adjustOptionWidth(QStyleOptionViewItemV4& option,
                                   const QAbstractProxyModel* proxyModel,
@@ -75,6 +79,8 @@ private:
     bool m_hasMinimizedNameColumn;
     mutable QSize m_cachedSize;
     mutable QPixmap m_cachedEmblems[KVersionControlPlugin::LocallyModifiedUnstagedVersion + 1];
+    mutable QColor m_cachedInactiveTextColor;
+    mutable bool m_cachedInactiveTextColorDirty;
 };
 
 inline void DolphinFileItemDelegate::setMinimizedNameColumn(bool minimized)