-rw-r--r-- | korganizer/koagendaitem.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index ee9f39a..a05c60e 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -94,10 +94,18 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
94 | QStringList categories = mIncidence->categories(); | 94 | QStringList categories = mIncidence->categories(); |
95 | QString cat = categories.first(); | 95 | QString cat = categories.first(); |
96 | if (cat.isEmpty()) { | 96 | if (cat.isEmpty()) { |
97 | mBackgroundColor =KOPrefs::instance()->mEventColor; | 97 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) |
98 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | ||
99 | else | ||
100 | mBackgroundColor =KOPrefs::instance()->mEventColor; | ||
98 | } else { | 101 | } else { |
99 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); | 102 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); |
103 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) { | ||
104 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) | ||
105 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | ||
106 | } | ||
100 | } | 107 | } |
108 | |||
101 | } | 109 | } |
102 | mColorGroup = QColorGroup( mBackgroundColor.light(), | 110 | mColorGroup = QColorGroup( mBackgroundColor.light(), |
103 | mBackgroundColor.dark(),mBackgroundColor.light(), | 111 | mBackgroundColor.dark(),mBackgroundColor.light(), |