]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Adjust the color when using the LocallyModifiedUnstagedVersion (patch written by...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 9 Nov 2010 16:26:19 +0000 (16:26 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 9 Nov 2010 16:26:19 +0000 (16:26 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1194724

src/views/dolphinfileitemdelegate.cpp
src/views/dolphinfileitemdelegate.h

index 64a19582a36db63bea4a799043a19b15a73b600c..3e537ffeb7afffeeb75ad02e73b423995d0c2d55 100644 (file)
@@ -119,11 +119,12 @@ void DolphinFileItemDelegate::adjustOptionTextColor(QStyleOptionViewItemV4& opti
     // as tint colors and are mixed with the current set text color. The tint colors
     // have been optimized for the base colors of the corresponding Oxygen emblems.
     switch (state) {
-    case KVersionControlPlugin::UpdateRequiredVersion:  tintColor = Qt::yellow; break;
-    case KVersionControlPlugin::LocallyModifiedVersion: tintColor = Qt::green; break;
-    case KVersionControlPlugin::AddedVersion:           tintColor = Qt::darkGreen; break;
-    case KVersionControlPlugin::RemovedVersion:         tintColor = Qt::darkRed; break;
-    case KVersionControlPlugin::ConflictingVersion:     tintColor = Qt::red; break;
+    case KVersionControlPlugin::UpdateRequiredVersion:          tintColor = Qt::yellow; break;
+    case KVersionControlPlugin::LocallyModifiedUnstagedVersion: tintColor = Qt::darkRed; break;
+    case KVersionControlPlugin::LocallyModifiedVersion:         tintColor = Qt::green; break;
+    case KVersionControlPlugin::AddedVersion:                   tintColor = Qt::darkGreen; break;
+    case KVersionControlPlugin::RemovedVersion:                 tintColor = Qt::darkRed; break;
+    case KVersionControlPlugin::ConflictingVersion:             tintColor = Qt::red; break;
     case KVersionControlPlugin::UnversionedVersion:
     case KVersionControlPlugin::NormalVersion:
     default:
@@ -143,7 +144,7 @@ void DolphinFileItemDelegate::adjustOptionTextColor(QStyleOptionViewItemV4& opti
 
 QPixmap DolphinFileItemDelegate::emblemForState(KVersionControlPlugin::VersionState state, const QSize& size) const
 {
-    Q_ASSERT(state <= KVersionControlPlugin::ConflictingVersion);
+    Q_ASSERT(state <= KVersionControlPlugin::LocallyModifiedUnstagedVersion);
     if (m_cachedSize != size) {
         m_cachedSize = size;
 
@@ -160,7 +161,7 @@ QPixmap DolphinFileItemDelegate::emblemForState(KVersionControlPlugin::VersionSt
         }
 
         const QSize emblemSize(emblemHeight, emblemHeight);
-        for (int i = KVersionControlPlugin::NormalVersion; i <= KVersionControlPlugin::ConflictingVersion; ++i) {
+        for (int i = KVersionControlPlugin::NormalVersion; i <= KVersionControlPlugin::LocallyModifiedUnstagedVersion; ++i) {
             QString iconName;
             switch (i) {
             case KVersionControlPlugin::NormalVersion:
index 0777571f754ea785575a9b6c0b22a43f75c4c7af..def83a883c422f584abdb191679d00754d705f00 100644 (file)
@@ -74,7 +74,7 @@ private:
 private:
     bool m_hasMinimizedNameColumn;
     mutable QSize m_cachedSize;
-    mutable QPixmap m_cachedEmblems[KVersionControlPlugin::ConflictingVersion + 1];
+    mutable QPixmap m_cachedEmblems[KVersionControlPlugin::LocallyModifiedUnstagedVersion + 1];
 };
 
 inline void DolphinFileItemDelegate::setMinimizedNameColumn(bool minimized)