-rw-r--r-- | korganizer/koagendaitem.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 6 |
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 | |||
@@ -93,12 +93,20 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
93 | else { | 93 | else { |
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(), |
104 | mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; | 112 | mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 32cc291..0548f14 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -196,8 +196,9 @@ KOPrefs::KOPrefs() : | |||
196 | KPrefs::setCurrentGroup("Colors"); | 196 | KPrefs::setCurrentGroup("Colors"); |
197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
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); |
202 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 203 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
203 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 204 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index b3acda7..8b849fa 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -122,8 +122,9 @@ class KOPrefs : public KPimPrefs | |||
122 | 122 | ||
123 | QColor mHolidayColor; | 123 | QColor mHolidayColor; |
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; |
128 | QColor mTodoDueTodayColor; | 129 | QColor mTodoDueTodayColor; |
129 | QColor mTodoOverdueColor; | 130 | QColor mTodoOverdueColor; |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 1b24f56..580dff2 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1175,8 +1175,14 @@ void KOPrefsDialog::setupColorsTab() | |||
1175 | addWidColor(i18n("Default event color:"), | 1175 | addWidColor(i18n("Default event color:"), |
1176 | &(KOPrefs::instance()->mEventColor),topFrame); | 1176 | &(KOPrefs::instance()->mEventColor),topFrame); |
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 |
1181 | KPrefsDialogWidColor *agendaBgColor = | 1187 | KPrefsDialogWidColor *agendaBgColor = |
1182 | addWidColor(i18n("Agenda view background color:"), | 1188 | addWidColor(i18n("Agenda view background color:"), |