Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 78d4027..44db209 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -265,9 +265,9 @@ void KOTodoViewItem::stateChange(bool state) } bool KOTodoViewItem::isAlternate() { -#ifndef KORG_NOLVALTERNATION + KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); if (lv && lv->alternateBackground().isValid()) { KOTodoViewItem *above = 0; @@ -302,11 +302,8 @@ bool KOTodoViewItem::isAlternate() } return m_odd; } return false; -#else - return false; -#endif } void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) { @@ -316,10 +313,10 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i role = QColorGroup::Text; else role = QColorGroup::Base; //#ifndef KORG_NOLVALTERNATION - // if (isAlternate()) - // _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); + if (isAlternate()) + _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; QColor colorToSet; if ( setColor ) { QStringList categories = mTodo->categories(); @@ -375,9 +372,9 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i int align = alignment; if ( !p ) return; - + p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); QListView *lv = listView(); if ( !lv ) |