summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index f62aab8..0cf6e4c 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -347,33 +347,33 @@ bool KOTodoViewItem::isAlternate()
347 while(item) 347 while(item)
348 { 348 {
349 item->m_odd = previous = !previous; 349 item->m_odd = previous = !previous;
350 item->m_known = true; 350 item->m_known = true;
351 item = static_cast<KOTodoViewItem *>(item->nextSibling()); 351 item = static_cast<KOTodoViewItem *>(item->nextSibling());
352 } 352 }
353 } 353 }
354 return m_odd; 354 return m_odd;
355 } 355 }
356 return false; 356 return false;
357} 357}
358 358
359void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) 359void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
360{ 360{
361 QColorGroup _cg = cg; 361 QColorGroup _cg = cg;
362 QColorGroup::ColorRole role; 362 QColorGroup::ColorRole role;
363 if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) 363 if ( KOPrefs::instance()->mTodoViewUsesForegroundColor && !mTodo->isRunning())
364 role = QColorGroup::Text; 364 role = QColorGroup::Text;
365 else 365 else
366 role = QColorGroup::Base; 366 role = QColorGroup::Base;
367 //#ifndef KORG_NOLVALTERNATION 367 //#ifndef KORG_NOLVALTERNATION
368 if (isAlternate()) 368 if (isAlternate())
369 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); 369 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
370 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; 370 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors;
371 QColor colorToSet; 371 QColor colorToSet;
372 if ( column == 0 && mTodo->calID() > 1 ) { 372 if ( column == 0 && mTodo->calID() > 1 ) {
373 setColor = true; 373 setColor = true;
374 colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() ); 374 colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() );
375 } else if ( setColor ) { 375 } else if ( setColor ) {
376 QStringList categories = mTodo->categories(); 376 QStringList categories = mTodo->categories();
377 QString cat = categories.first(); 377 QString cat = categories.first();
378 if ( !cat.isEmpty()) { 378 if ( !cat.isEmpty()) {
379 colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); 379 colorToSet = *(KOPrefs::instance()->categoryColor(cat) );