summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
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 )
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(),
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() :
198 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 198 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
199 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 199 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
200 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
200 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 201 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
201 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 202 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
124 QColor mHighlightColor; 124 QColor mHighlightColor;
125 QColor mEventColor; 125 QColor mEventColor;
126 QColor mTodoDoneColor;
126 QColor mAgendaBgColor; 127 QColor mAgendaBgColor;
127 QColor mWorkingHoursColor; 128 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()
1177 topLayout->addWidget(eventColor->label(),ii,0); 1177 topLayout->addWidget(eventColor->label(),ii,0);
1178 topLayout->addWidget(eventColor->button(),ii++,1); 1178 topLayout->addWidget(eventColor->button(),ii++,1);
1179 eventColor =
1180 addWidColor(i18n("Default todo done color:"),
1181 &(KOPrefs::instance()->mTodoDoneColor),topFrame);
1182 topLayout->addWidget(eventColor->label(),ii,0);
1183 topLayout->addWidget(eventColor->button(),ii++,1);
1184
1179 1185
1180 // agenda view background color 1186 // agenda view background color