From 820a1285559d0bb5859f634ebc6865f3a85a93ab Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 15 Jun 2005 09:06:25 +0000 Subject: color fixes --- (limited to 'korganizer/kotodoviewitem.cpp') diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index f987b63..748f3e4 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -368,14 +368,17 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; QColor colorToSet; - if ( setColor ) { + 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() ) -- cgit v0.9.0.2