summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp10
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
@@ -93,12 +93,20 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
else {
QStringList categories = mIncidence->categories();
QString cat = categories.first();
if (cat.isEmpty()) {
- mBackgroundColor =KOPrefs::instance()->mEventColor;
+ if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) )
+ mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
+ else
+ mBackgroundColor =KOPrefs::instance()->mEventColor;
} else {
mBackgroundColor = *KOPrefs::instance()->categoryColor(cat);
+ if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) {
+ if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
+ mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
+ }
}
+
}
mColorGroup = QColorGroup( mBackgroundColor.light(),
mBackgroundColor.dark(),mBackgroundColor.light(),
mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ;