summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
Unidiff
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
@@ -326,26 +326,22 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
326 QString cat = categories.first(); 326 QString cat = categories.first();
327 if ( !cat.isEmpty()) { 327 if ( !cat.isEmpty()) {
328 colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); 328 colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
329 } else 329 } else
330 setColor = false; 330 setColor = false;
331 } 331 }
332 if (mTodo->hasDueDate()) { 332
333 if (mTodo->dtDue().date()==QDate::currentDate() && 333 int odue = mTodo->hasDueSubTodo( !isOpen());
334 !mTodo->isCompleted()) { 334 if (odue == 2) {
335 //_cg.setColor( role , KOPrefs::instance()->mTodoDueTodayColor);
336 colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
337 setColor = true;
338 }
339 if (mTodo->dtDue().date() < QDate::currentDate() &&
340 !mTodo->isCompleted()) {
341 //_cg.setColor( role, KOPrefs::instance()->mTodoOverdueColor);
342 colorToSet = KOPrefs::instance()->mTodoOverdueColor; 335 colorToSet = KOPrefs::instance()->mTodoOverdueColor;
343 setColor = true; 336 setColor = true;
337 } else if ( odue == 1 ) {
338 colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
339 setColor = true;
344 } 340 }
345 } 341
346 342
347 if ( setColor ) { 343 if ( setColor ) {
348 _cg.setColor(role,colorToSet ); 344 _cg.setColor(role,colorToSet );
349 if ( role == QColorGroup::Base) { 345 if ( role == QColorGroup::Base) {
350 int rgb = colorToSet.red(); 346 int rgb = colorToSet.red();
351 rgb += colorToSet.blue()/2; 347 rgb += colorToSet.blue()/2;