summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
Side-by-side diff
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
@@ -339,49 +339,49 @@ bool KOTodoViewItem::isAlternate()
previous = item->m_odd;
item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
}
else
{
item = static_cast<KOTodoViewItem *>(lv->firstChild());
}
while(item)
{
item->m_odd = previous = !previous;
item->m_known = true;
item = static_cast<KOTodoViewItem *>(item->nextSibling());
}
}
return m_odd;
}
return false;
}
void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
{
QColorGroup _cg = cg;
QColorGroup::ColorRole role;
- if ( KOPrefs::instance()->mTodoViewUsesForegroundColor )
+ if ( KOPrefs::instance()->mTodoViewUsesForegroundColor && !mTodo->isRunning())
role = QColorGroup::Text;
else
role = QColorGroup::Base;
//#ifndef KORG_NOLVALTERNATION
if (isAlternate())
_cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors;
QColor colorToSet;
if ( column == 0 && mTodo->calID() > 1 ) {
setColor = true;
colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() );
} else if ( setColor ) {
QStringList categories = mTodo->categories();
QString cat = categories.first();
if ( !cat.isEmpty()) {
colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
} else
setColor = false;
}
bool openMode = !isOpen();
// maybe we are in flat-display-mode
if ( !firstChild() )
openMode = false;
bool colorRunning = mTodo->isRunning();