summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp10
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp6
4 files changed, 17 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
@@ -95,8 +95,16 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
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(),
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 32cc291..0548f14 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -198,4 +198,5 @@ KOPrefs::KOPrefs() :
addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
+ addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index b3acda7..8b849fa 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -124,4 +124,5 @@ class KOPrefs : public KPimPrefs
QColor mHighlightColor;
QColor mEventColor;
+ QColor mTodoDoneColor;
QColor mAgendaBgColor;
QColor mWorkingHoursColor;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 1b24f56..580dff2 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1177,4 +1177,10 @@ void KOPrefsDialog::setupColorsTab()
topLayout->addWidget(eventColor->label(),ii,0);
topLayout->addWidget(eventColor->button(),ii++,1);
+ eventColor =
+ addWidColor(i18n("Default todo done color:"),
+ &(KOPrefs::instance()->mTodoDoneColor),topFrame);
+ topLayout->addWidget(eventColor->label(),ii,0);
+ topLayout->addWidget(eventColor->button(),ii++,1);
+
// agenda view background color