summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
authorzautrix <zautrix>2005-06-15 09:06:25 (UTC)
committer zautrix <zautrix>2005-06-15 09:06:25 (UTC)
commit820a1285559d0bb5859f634ebc6865f3a85a93ab (patch) (unidiff)
tree35278bfc95f131b4577d2f1d09c5915b5336e01a /korganizer/kotodoviewitem.cpp
parentc50dea673d7bf65614e042a0e3c0c53c73c705a0 (diff)
downloadkdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.zip
kdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.tar.gz
kdepimpi-820a1285559d0bb5859f634ebc6865f3a85a93ab.tar.bz2
color fixes
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp7
1 files changed, 5 insertions, 2 deletions
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
368 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); 368 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
369 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; 369 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors;
370 QColor colorToSet; 370 QColor colorToSet;
371 if ( setColor ) { 371 if ( column == 0 && mTodo->calID() > 1 ) {
372 setColor = true;
373 colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() );
374 } else if ( setColor ) {
372 QStringList categories = mTodo->categories(); 375 QStringList categories = mTodo->categories();
373 QString cat = categories.first(); 376 QString cat = categories.first();
374 if ( !cat.isEmpty()) { 377 if ( !cat.isEmpty()) {
375 colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); 378 colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
376 } else 379 } else
377 setColor = false; 380 setColor = false;
378 } 381 }
379 bool openMode = !isOpen(); 382 bool openMode = !isOpen();
380 // maybe we are in flat-display-mode 383 // maybe we are in flat-display-mode
381 if ( !firstChild() ) 384 if ( !firstChild() )