summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 6bdee18..78d4027 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -329,20 +329,16 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
} else
setColor = false;
}
- if (mTodo->hasDueDate()) {
- if (mTodo->dtDue().date()==QDate::currentDate() &&
- !mTodo->isCompleted()) {
- //_cg.setColor( role , KOPrefs::instance()->mTodoDueTodayColor);
- colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
- setColor = true;
- }
- if (mTodo->dtDue().date() < QDate::currentDate() &&
- !mTodo->isCompleted()) {
- //_cg.setColor( role, KOPrefs::instance()->mTodoOverdueColor);
+
+ int odue = mTodo->hasDueSubTodo( !isOpen());
+ if (odue == 2) {
colorToSet = KOPrefs::instance()->mTodoOverdueColor;
setColor = true;
+ } else if ( odue == 1 ) {
+ colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
+ setColor = true;
}
- }
+
if ( setColor ) {
_cg.setColor(role,colorToSet );